Download data/lean/OAI/GroupTheory/SimpleOvergroups/FiniteNames.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.05 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/FiniteNames.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/GroupTheory/SimpleOvergroups/FiniteNames.lean
-
curl -L -o FiniteNames.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/FiniteNames.lean
2.05 kB
| import Mathlib | |
| namespace OAI | |
| namespace SimpleFInftyOvergroups.EffectiveNames.Finite | |
| variable {A B P : Type*} {n : β} | |
| def traverse (f : A β Part B) (x : Fin n β A) : Part (Fin n β B) := | |
| (List.Vector.mOfFn (fun i => f (x i))).map List.Vector.get | |
| theorem vector_full (f : Fin n β Part B) (g : Fin n β B) (h : β i, g i β f i) : | |
| List.Vector.ofFn g β List.Vector.mOfFn f := by | |
| induction n with | |
| | zero => exact Part.mem_some _ | |
| | succ n ih => | |
| simp only [List.Vector.mOfFn] | |
| refine Part.mem_bind_iff.mpr β¨g 0, h 0, ?_β© | |
| exact Part.mem_bind_iff.mpr β¨_,ih (fun i => f i.succ) (fun i => g i.succ) | |
| (fun i => h i.succ), Part.mem_some _β© | |
| theorem traverse_full (f : A β Part B) (g : A β B) (x : Fin n β A) | |
| (h : β i, g (x i) β f (x i)) : (fun i => g (x i)) β traverse f x := by | |
| change _ β (List.Vector.mOfFn (fun i => f (x i))).map List.Vector.get | |
| convert Part.mem_map List.Vector.get (vector_full (fun i => f (x i)) (fun i => g (x i)) h) using 1 | |
| funext i | |
| exact (List.Vector.get_ofFn (fun i => g (x i)) i).symm | |
| variable [Primcodable A] [Primcodable B] [Primcodable P] | |
| theorem partrec_traverse {f : P β A β Part B} (hf : Partrecβ f) : | |
| Partrecβ (fun p : P => traverse (n:=n) (f p)) := by | |
| have hh : β i : Fin n, Partrec (fun p : P Γ (Fin n β A) => f p.1 (p.2 i)) := | |
| fun i => hf.comp Computable.fst (Primrec.fin_app.to_comp.comp Computable.snd (Computable.const i)) | |
| exact (Partrec.vector_mOfFn hh).map (Primrec.vector_get'.to_comp.comp Computable.snd).toβ | |
| theorem computable_function {f : P β Fin n β B} (hf : β i, Computable (fun p => f p i)) : | |
| Computable f := by | |
| exact (Primrec.vector_get'.to_comp.comp (Computable.vector_ofFn hf)).of_eq | |
| (fun p => by funext i; simp) | |
| theorem primrec_function {f : P β Fin n β B} (hf : β i, Primrec (fun p => f p i)) : | |
| Primrec f := by | |
| exact (Primrec.vector_get'.comp (Primrec.vector_ofFn hf)).of_eq | |
| (fun p => by funext i; simp) | |
| end SimpleFInftyOvergroups.EffectiveNames.Finite | |
| end OAI | |