Download lean/OAI/Analysis/Commutator/BoundedWordPool.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/Commutator/BoundedWordPool.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Analysis/Commutator/BoundedWordPool.lean
-
curl -L -o BoundedWordPool.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/Commutator/BoundedWordPool.lean
1.14 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| section | |
| noncomputable section | |
| namespace Kadison.FinitePatching | |
| variable (I : Type*) [Fintype I] | |
| def listPool (N : ℕ) : Finset (List I) := by | |
| classical | |
| exact Finset.univ.biUnion (fun n : Fin (N+1) => | |
| Finset.univ.image (fun f : Fin n → I => List.ofFn f)) | |
| lemma mem_listPool (N : ℕ) (l : List I) : l∈listPool I N ↔ l.length ≤ N := by | |
| classical | |
| constructor | |
| · intro h | |
| simp only [listPool,Finset.mem_biUnion,Finset.mem_univ,Finset.mem_image,true_and] at h | |
| obtain ⟨n,f,rfl⟩ := h | |
| simpa only [List.length_ofFn] using Nat.le_of_lt_succ n.isLt | |
| · intro h | |
| simp only [listPool,Finset.mem_biUnion,Finset.mem_univ,Finset.mem_image,true_and] | |
| exact ⟨⟨l.length,Nat.lt_succ_of_le h⟩,l.get,List.ofFn_get l⟩ | |
| abbrev SmallList (N : ℕ) := ↥(listPool I N) | |
| def smallList {N : ℕ} (l : List I) (h : l.length ≤ N) : SmallList I N := | |
| ⟨l,(mem_listPool I N l).mpr h⟩ | |
| lemma SmallList.length_le {N : ℕ} (l : SmallList I N) : l.val.length ≤ N := | |
| (mem_listPool I N l.val).mp l.property | |
| end Kadison.FinitePatching | |
| end | |
| end | |
| end | |
| end OAI | |