File size: 1,144 Bytes
a458723 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 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
|