Functions depending only on some variables #
When dealing with a function f : (i : ι) → α i
depending on many variables, some operations
may get rid of the dependency on some variables
(see Function.updateFinset
or lmarginal
for example). However considering this new function
as having a different domain with fewer points is not comfortable in Lean, as it requires the use
of subtypes and can lead to tedious writing.
On the other hand one wants to be able for example to call some function constant with respect to
some variables and be able to infer this when applying transformations mentioned above.
This is why introduce the predicate DependsOn f s
, which states that if x
and y
coincide over
the set s
, then f x = f y
. This is then used to prove some properties about lmarginals.
Main definitions #
DependsOn f s
: Ifx
andy
coincide over the sets
, thenf x
equalsf y
.
Main statements #
dependsOn_lmarginal
: If a functionf
depends on a sets
andt
is a finite set, then∫⋯∫⁻_t, f ∂μ
depends ons \ t
.lmarginal_eq_of_disjoint
: If a functionf
depends on a sets
andt
is a finite set disjoint froms
and the measuresμ i
are probability measures, then∫⋯∫⁻_t, f ∂μ
is equal tof
.
Tags #
depends on, updateFinset, update, lmarginal
If one replaces the variables indexed by a finite set t
, then f
no longer depends on
these variables.
If one replaces the variable indexed by i
, then f
no longer depends on
this variable.
If a function depends on s
, then its lmarginal
with respect to a finite set t
only
depends on s \ t
.
If μ
is a family of probability measures, and f
depends on s
, then integrating over
some variables which are not in s
does not change the value.
Integrating a constant over some variables with respect to probability measures does nothing.
If μ
is a family of probability measures, and f
depends on s
, then integrating over
two different sets of variables such that their difference is not in s
yields the same function.
If μ
is a family of probability measures, and f
depends on s
, then integrating over
two different sets of variables such that their difference is not in s
yields the same function.