Download data/lean/OAI/Computability/SpaceSimulation/Register/Static.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.93 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/SpaceSimulation/Register/Static.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/SpaceSimulation/Register/Static.lean
-
curl -L -o Static.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/SpaceSimulation/Register/Static.lean
1.93 kB
| import OAI.Computability.SpaceSimulation.Register.Arithmetic | |
| namespace OAI | |
| /-! Finite-case reasoning in the indexed complexity calculus. -/ | |
| namespace Fifths | |
| namespace Comp | |
| variable {X I Y : Type} {x : I β List X} {S a b : I β β} | |
| theorem divideCases [Fintype Y] (code : Y β β) (inj : Function.Injective code) | |
| {w : I β Y} (r : Comp x S a (fun i => code (w i))) | |
| (h : β y, Comp (fun i : {i // w i = y} => x i) (fun i => S i) (fun i => a i) | |
| (fun i => b i)) : Comp x S a b := by | |
| classical | |
| suffices g : β l : Finset Y, | |
| Comp (fun i : {i // w i β l} => x i) (fun i => S i) (fun i => a i) (fun i => b i) from | |
| (g Finset.univ).pull (fun i => β¨i,Finset.mem_univ (w i)β©) | |
| intro l | |
| induction l using Finset.induction_on with | |
| | empty => | |
| let f := fun i : {i // w i β (β : Finset Y)} => i.val | |
| exact (Comp.constant (r.pull f).source 0).congr (fun i => by have a := i.property; simp at a) | |
| | y l m ih => | |
| let f := fun i : {i // w i β insert y l} => i.val | |
| have p := r.pull f | |
| let B (i : {i // w i β insert y l}) := decide (code (w (f i)) = code y) | |
| refine (casesB (B := B) (p.eq (Comp.constant p.source (code y))) ?_ ?_) | |
| Β· exact (h y).pull (fun i : {i // B i = true} => β¨f i.val,inj (of_decide_eq_true i.property)β©) | |
| Β· exact ih.pull (fun i : {i // B i = false} => β¨f i.val,by | |
| have g := Finset.mem_insert.mp i.val.property | |
| rcases g with g|g | |
| Β· have a := i.property | |
| simp [B,f,g] at a | |
| Β· exact gβ©) | |
| theorem chooseCase [Fintype Y] (code : Y β β) (inj : Function.Injective code) {w : I β Y} | |
| (p : I β Y β β) (r : Comp x S a (fun i => code (w i))) | |
| (h : β y, Comp x S a (fun i => p i y)) : | |
| Comp x S a (fun i => p i (w i)) := by | |
| refine divideCases code inj r ?_ | |
| intro y | |
| exact ((h y).pull _).congr (fun i => congrArg (p i) i.property.symm) | |
| end Comp | |
| end Fifths | |
| end OAI | |