Skip to content

Commit

Permalink
Reintroduce base positions
Browse files Browse the repository at this point in the history
Signed-off-by: zeramorphic <[email protected]>
  • Loading branch information
zeramorphic committed Mar 19, 2024
1 parent 5ea4ef8 commit 33668f5
Show file tree
Hide file tree
Showing 45 changed files with 204 additions and 326 deletions.
7 changes: 4 additions & 3 deletions ConNF/Counting/CodingFunction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,17 @@ theorem code_eq_code_iff (S S' : Support β) (t t' : Tangle β)
refine ext (ρ • S) ⟨ρ, rfl⟩ ⟨1, by rw [one_smul]⟩ ?_
simp only [code_decode, Part.get_some, decode_smul]

def Strong [FOAAssumptions] {β : Λ} [LeLevel β] (χ : CodingFunction β) : Prop :=
def Strong [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β] (χ : CodingFunction β) : Prop :=
∀ S ∈ χ.decode.Dom, S.Strong

theorem strong_of_strong_mem [FOAAssumptions] {β : Λ} [LeLevel β]
theorem strong_of_strong_mem [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]
(χ : CodingFunction β) (S : Support β) (hS : S.Strong) (hSχ : S ∈ χ.decode.Dom) : χ.Strong := by
intro T hTχ
obtain ⟨ρ, rfl⟩ := (χ.dom_iff S T hSχ).mp hTχ
exact hS.smul ρ

theorem code_strong [FOAAssumptions] {β : Λ} [LeLevel β] (S : Support β) (t : Tangle β)
theorem code_strong [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]
(S : Support β) (t : Tangle β)
(ht : Supports (Allowable β) (S : Set (Address β)) t) (hS : S.Strong) :
(code S t ht).Strong :=
strong_of_strong_mem _ S hS mem_code_self
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/Conclusions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [CountingAssumptions]
variable [Params.{u}] [Level] [BasePositions] [CountingAssumptions]

theorem mk_codingFunction (β : Λ) [i : LeLevel β] : #(CodingFunction β) < #μ := by
revert i
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/CountCodingFunction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
variable [Params.{u}] [Level] [BasePositions] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
(hγ : (γ : TypeIndex) < β)

def RecodeType (S : Support β) : Type u :=
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/CountRaisedSingleton.lean
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
variable [Params.{u}] [Level] [BasePositions] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
(hγ : (γ : TypeIndex) < β)

noncomputable def RaisedSingleton.code (S : Support β) (r : RaisedSingleton hγ S) :
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/CountSpec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ} [LeLevel β]
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]

def SpecCondition' (β : Λ) :=
(ExtendedIndex β × Set κ × Set κ) ⊕
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/CountStrongOrbit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ} [LeLevel β]
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]

/-- A morphism of supports `S → T`. -/
structure SupportHom (S T : Support β) : Type u where
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/ExistsSpec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ}
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ}

noncomputable def Support.spec (S : Support β) (hS : S.Strong) : Spec β where
max := S.max
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/Hypotheses.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level]
variable [Params.{u}] [Level] [BasePositions]

instance : LeLevel (0 : Λ) := ⟨WithBot.coe_le_coe.mpr (Params.Λ_zero_le _)⟩

Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/Recode.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
variable [Params.{u}] [Level] [BasePositions] [CountingAssumptions] {β γ : Λ} [LeLevel β] [LeLevel γ]
(hγ : (γ : TypeIndex) < β)

def raiseIndex (A : ExtendedIndex (γ : TypeIndex)) : ExtendedIndex β :=
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/Spec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ}
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ}

inductive SpecCondition (β : Λ)
| atom (A : ExtendedIndex β) (s : Set κ) (t : Set κ)
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/SpecSMul.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ} [LeLevel β]
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]
{S T : Support β} {hS : S.Strong} {σ : Spec β} (hσS : σ.Specifies S hS) (ρ : Allowable β)

theorem Spec.Specifies.smul : σ.Specifies (ρ • S) (hS.smul ρ) := by
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/SpecSame.lean
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end PFun

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ} [LeLevel β]
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]
{S T : Support β} {hS : S.Strong} {hT : T.Strong}
{σ : Spec β} (hσS : σ.Specifies S hS) (hσT : σ.Specifies T hT)

Expand Down
4 changes: 2 additions & 2 deletions ConNF/Counting/StrongSupport.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace ConNF

namespace Support

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ}
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ}

@[mk_iff]
inductive Interferes (a : Atom) (N₁ N₂ : NearLitter) : Prop
Expand Down Expand Up @@ -68,7 +68,7 @@ theorem Precedes.lt {c d : Address β} :
case fuzzBot A N h =>
refine lt_nearLitter (Relation.TransGen.single ?_)
simp_rw [h.hL]
exact Constrains.fuzz_bot h.path.hε _ _
exact Constrains.fuzzBot h.path.hε _ _

theorem Precedes.wellFounded : WellFounded (Precedes : Address β → Address β → Prop) := by
have : Subrelation Precedes ((· < ·) : Address β → Address β → Prop) := Precedes.lt
Expand Down
2 changes: 1 addition & 1 deletion ConNF/Counting/SupportOrbit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ universe u

namespace ConNF

variable [Params.{u}] [Level] [FOAAssumptions] {β : Λ} [LeLevel β]
variable [Params.{u}] [Level] [BasePositions] [FOAAssumptions] {β : Λ} [LeLevel β]

def SupportOrbit (β : Λ) [LeLevel β] : Type u :=
MulAction.orbitRel.Quotient (Allowable β) (Support β)
Expand Down
2 changes: 1 addition & 1 deletion ConNF/FOA/Action/Complete.lean
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ universe u
namespace ConNF

variable [Params.{u}] (φ : NearLitterAction) [Level]
[FOAAssumptions] {β : Λ} {A : ExtendedIndex β}
[BasePositions] [FOAAssumptions] {β : Λ} {A : ExtendedIndex β}

namespace NearLitterAction

Expand Down
2 changes: 1 addition & 1 deletion ConNF/FOA/Action/NearLitterAction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ theorem roughLitterMapOrElse_injOn (hφ : φ.Lawful) :
rw [φ.roughLitterMapOrElse_of_dom hL₁, φ.roughLitterMapOrElse_of_dom hL₂] at h
exact hφ.litterMap_injective hL₁ hL₂ (NearLitter.inter_nonempty_of_fst_eq_fst h)

variable [Level] [FOAAssumptions] {β : Λ} {A : ExtendedIndex β}
variable [Level] [BasePositions] [FOAAssumptions] {β : Λ} {A : ExtendedIndex β}

theorem mk_not_bannedLitter_and_flexible : #{L | ¬φ.BannedLitter L ∧ Flexible A L} = #μ := by
refine' le_antisymm ((mk_subtype_le _).trans mk_litter.le) _
Expand Down
2 changes: 1 addition & 1 deletion ConNF/FOA/Action/Refine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ end StructAction

namespace StructAction

variable [Level] [FOAAssumptions] {β : Λ}
variable [Level] [BasePositions] [FOAAssumptions] {β : Λ}

/-- Refine and complete this action into a structural approximation. -/
noncomputable def rc (φ : StructAction β) (h : φ.Lawful) : StructApprox β :=
Expand Down
6 changes: 3 additions & 3 deletions ConNF/FOA/Action/StructAction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def Lawful {β : TypeIndex} (φ : StructAction β) : Prop :=
∀ B, (φ B).Lawful

/-- This structural action maps flexible litters to flexible litters. -/
def MapFlexible [Level] [FOAAssumptions] {β : Λ} (φ : StructAction β) :
def MapFlexible [Level] [BasePositions] [FOAAssumptions] {β : Λ} (φ : StructAction β) :
Prop :=
∀ (B) (L : Litter) (hL), Flexible B L → Flexible B (((φ B).litterMap L).get hL).1

Expand All @@ -36,7 +36,7 @@ section Precise
def Precise {β : TypeIndex} (φ : StructAction β) : Prop :=
∀ B, (φ B).Precise

variable [Level] [FOAAssumptions] {β : Λ} (φ : StructAction β)
variable [Level] [BasePositions] [FOAAssumptions] {β : Λ} (φ : StructAction β)

noncomputable def complete (hφ : φ.Lawful) : StructApprox β := fun B => (φ B).complete (hφ B) B

Expand Down Expand Up @@ -67,7 +67,7 @@ theorem smul_nearLitter_eq_of_precise {hφ : φ.Lawful} (hφp : φ.Precise) {π

end Precise

variable [Level] [FOAAssumptions] {β : Λ}
variable [Level] [BasePositions] [FOAAssumptions] {β : Λ}

instance {β : TypeIndex} : PartialOrder (StructAction β)
where
Expand Down
2 changes: 1 addition & 1 deletion ConNF/FOA/Approximation/NearLitterApprox.lean
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ theorem ExactlyApproximates.mem_litterSet_inv {π₀ : NearLitterApprox} {π : N
(hπ : π₀.ExactlyApproximates π) (a : Atom) (ha : a ∉ π₀.atomPerm.domain) :
π⁻¹ • a ∈ litterSet (π⁻¹ • a.1) := by contrapose! ha; exact hπ.exception_mem _ (Or.inr ha)

def Free [Level] [FOAAssumptions] {β : TypeIndex} (π : NearLitterApprox)
def Free [Level] [BasePositions] [FOAAssumptions] {β : TypeIndex} (π : NearLitterApprox)
(A : ExtendedIndex β) : Prop :=
∀ L ∈ π.litterPerm.domain, Flexible A L

Expand Down
2 changes: 1 addition & 1 deletion ConNF/FOA/Approximation/StructApprox.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def Approximates {β : TypeIndex} (π₀ : StructApprox β) (π : StructPerm β)
def ExactlyApproximates {β : TypeIndex} (π₀ : StructApprox β) (π : StructPerm β) : Prop :=
∀ A, (π₀ A).ExactlyApproximates (π A)

variable [Level] [FOAAssumptions]
variable [Level] [BasePositions] [FOAAssumptions]

def Free {β : Λ} (π₀ : StructApprox β) : Prop :=
∀ A, (π₀ A).Free A
Expand Down
Loading

0 comments on commit 33668f5

Please sign in to comment.