Le 29 juin 2012 ? 00:52, Richard Fateman a ?crit :
> While there are possible uses for contexts, are you sure you really need them?
Well, it's impossible to say that it's impossible
to do something different...
but that gives me an efficient design
> Or are you using contexts instead of simple bindings of variables?
I have integrals like this
\int_{x=...}^{...} \int_{t=f(x)}^{...} foo(t,x) dt dx
But integrate tells me that it needs to know that f(x) is real
so I assume that x has some properties to ensure that f(x) is real
This assumption must be local to the computation of this integral
because either the property has no global meaning or
different integrals need different assumptions that are sometimes contradictory.
So I create a context, switch to that context, make the assumptions, make the computations, restore the previous context and kill the created one.
Of course I could perfectly use forget but that would be a nightmare because
some assumptions needed for some integrals were already made in the initial context and
must not be forgotten, whereas others must. That is too many lines of code...
I use contexts are a scope for assumptions, they are a mean to distinguish variables of integration from other kinds of variables.
And things are more complicated...
J?r?me