import Mathlib namespace OAI namespace TuringRigidity abbrev Oracle := ℕ → Bool def oracleFunction (A : Oracle) : ℕ →. ℕ := fun n => Part.some (if A n then 1 else 0) def Reduces (A B : Oracle) : Prop := TuringReducible (oracleFunction A) (oracleFunction B) instance : IsPreorder Oracle Reduces where refl A := TuringReducible.refl (oracleFunction A) trans _ _ _ h k := TuringReducible.trans h k def Degree := Antisymmetrization Oracle Reduces instance : PartialOrder Degree := @instPartialOrderAntisymmetrization Oracle { le := Reduces lt A B := Reduces A B ∧ ¬ Reduces B A lt_iff_le_not_ge _ _ := Iff.rfl le_refl A := TuringReducible.refl (oracleFunction A) le_trans _ _ _ h k := TuringReducible.trans h k } private instance oraclePreorder : Preorder Oracle where le := Reduces lt A B := Reduces A B ∧ ¬ Reduces B A lt_iff_le_not_ge _ _ := Iff.rfl le_refl A := TuringReducible.refl (oracleFunction A) le_trans _ _ _ h k := TuringReducible.trans h k def MainTheorem : Prop := ∀ π : Degree ≃o Degree, ∀ a : Degree, π a = a end TuringRigidity end OAI