roseking's picture
Add lean source and binary files (part 60)
9dbc64e verified
Raw History Blame Contribute Delete
3.9 kB
12
theorem selected_generic_ideal (D : ℕ → List Bool → Prop) (hd : ∀ n, DenseOpen (D n)) :
    ∃ G : Bool → Oracle → Oracle, (∀ b, Measurable (G b)) ∧
      (∀ A b, GenericFor D (G b A) ∧ GenericCoding.InfiniteOdd (G b A) ∧
        ∀ Y, GenericFor D (GenericCoding.code Y (G b A))) ∧
      ∀ A a, a ≤ degree A ↔ a ≤ degree (join A (G false A)) ∧ a ≤ degree (join A (G true A)) := by
proof · 5 lines
  obtain ⟨Z,hZ,hgeneric,hfamily⟩ := borel_pair_selection D hd CommonIdeal.family
    CommonIdeal.family_dense CommonIdeal.family_measurable
  refine ⟨fun b A => column b (Z A),fun b => (column_measurable b).comp hZ,hgeneric,?_⟩
  intro A a
  exact CommonIdeal.ideal_of_family A (Z A) (hfamily A) a
23
def GenericContinuousRepresentation (π : Degree ≃o Degree) : Prop :=
body · 3 lines
  ∃ D : ℕ → List Bool → Prop, (∀ n, DenseOpen (D n)) ∧
    ∃ f : Oracle → Oracle, ContinuousOn f {A | GenericFor D A} ∧
      ∀ A, GenericFor D A → degree (f A) = π (degree A)
28
theorem generic_continuous_of_subtype (π : Degree ≃o Degree)
    (D : ℕ → List Bool → Prop) (hD : ∀ n, DenseOpen (D n))
    (f : {A : Oracle // GenericFor D A} → Oracle) (hf : Continuous f)
    (hπ : ∀ A, degree (f A) = π (degree A.val)) : GenericContinuousRepresentation π := by
proof · 13 lines
  classical
  let F : Oracle → Oracle := fun A => if hA : GenericFor D A then f ⟨A,hA⟩ else fun _ => false
  have hF : ContinuousOn F {A | GenericFor D A} := by
    apply continuousOn_iff_continuous_domRestrict.mpr
    have he : (fun A : {A : Oracle // GenericFor D A} => F A.val) = f := by
      funext A
      simp [F,A.property]
    change Continuous (fun A : {A : Oracle // GenericFor D A} => F A.val)
    rw [he]
    exact hf
  refine ⟨D,hD,F,hF,?_⟩
  intro A hA
  simpa [F,hA] using hπ ⟨A,hA⟩
46
def GenericProgramRepresentation (π : Degree ≃o Degree) : Prop :=
body · 3 lines
  ∃ D : ℕ → List Bool → Prop, (∀ n, DenseOpen (D n)) ∧
    ∃ P : Oracle, ∃ p : OracleCode, ∀ A, GenericFor D A →
      ∃ B, OracleCode.eval (oracleFunction (join A P)) p = oracleFunction B ∧ degree B = π (degree A)
51
theorem generic_program_of_continuous (π : Degree ≃o Degree)
    (h : GenericContinuousRepresentation π) : GenericProgramRepresentation π := by
proof · 3 lines
  obtain ⟨D,hD,f,hf,hπ⟩ := h
  obtain ⟨P,p,hp⟩ := ContinuousCode.continuous_uniform_program {A | GenericFor D A} f hf
  exact ⟨D,hD,P,p,fun A hA => ⟨f A,hp A hA,hπ A hA⟩⟩
57
theorem borel_of_generic_program (π : Degree ≃o Degree) (h : GenericProgramRepresentation π) :
    ∃ H : Oracle → Oracle, Measurable H ∧ ∀ A, degree (H A) = π (degree A) := by
proof · 6 lines
  obtain ⟨D,hD,P,p,hp⟩ := h
  obtain ⟨G,hG,hgeneric,hideal⟩ := selected_generic_ideal D hD
  exact representative_from_generic_program π p P G hG
    (fun A b => (hgeneric A b).2.1)
    (fun A b => hp (G b A) (hgeneric A b).1)
    (fun A b => hp (GenericCoding.code A (G b A)) ((hgeneric A b).2.2 A)) hideal
66
theorem borel_of_generic_continuous (π : Degree ≃o Degree) (h : GenericContinuousRepresentation π) :
    ∃ H : Oracle → Oracle, Measurable H ∧ ∀ A, degree (H A) = π (degree A) :=
proof · 1 line
  borel_of_generic_program π (generic_program_of_continuous π h)
70
theorem main_of_generic_continuous (h : ∀ π, GenericContinuousRepresentation π) : MainTheorem :=
proof · 1 line
  main_of_representation (fun π => borel_of_generic_continuous π (h π))