File size: 1,815 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | import OAI.NumberTheory.DukePrimeDegree.Entropy.LayeredObservations
namespace OAI
/-! # Finite integer codes for families of real cuts -/
noncomputable section
open MeasureTheory
namespace DukePrimeDegree
def finiteCutCode {Y : Type*} {N : β} (f : Fin N β Y β β) (c : Fin N β β)
(x : Y) : Fin (Fintype.card (Fin N β Bool)) :=
Fintype.equivFin (Fin N β Bool) (fun i => decide (f i x < c i))
lemma finiteCutCode_measurable {Y : Type*} [MeasurableSpace Y] {N : β}
{f : Fin N β Y β β} (hf : β i, Measurable (f i)) (c : Fin N β β) :
Measurable (finiteCutCode f c) := by
apply (measurable_of_finite (Fintype.equivFin (Fin N β Bool))).comp
apply measurable_pi_iff.mpr
intro i
apply measurable_to_bool
have he : (fun x => decide (f i x < c i)) β»ΒΉ' {true} = {x | f i x < c i} := by
ext x
simp
rw [he]
exact measurableSet_lt (hf i) measurable_const
lemma finiteCutCode_eq_of_iff {Y : Type*} {N : β}
(f : Fin N β Y β β) (c : Fin N β β) {x y : Y}
(h : β i, f i y < c i β f i x < c i) : finiteCutCode f c y=finiteCutCode f c x := by
apply congrArg (Fintype.equivFin (Fin N β Bool))
funext i
simp only [h i]
lemma finiteCutCode_eq_imp_iff {Y : Type*} {N : β}
(f : Fin N β Y β β) (c : Fin N β β) {x y : Y}
(h : finiteCutCode f c y=finiteCutCode f c x) (i : Fin N) :
f i y < c i β f i x < c i := by
have he := congrFun ((Fintype.equivFin (Fin N β Bool)).injective h) i
constructor
Β· intro hy
have hx : decide (f i x < c i)=true := by
rw [βhe]
exact decide_eq_true hy
exact of_decide_eq_true hx
Β· intro hx
have hy : decide (f i y < c i)=true := by
rw [he]
exact decide_eq_true hx
exact of_decide_eq_true hy
end DukePrimeDegree
end
end OAI
|