Skip to content

Commit 930e594

Browse files
committed
Pullback
1 parent f52da74 commit 930e594

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Foundation/Logic/Calculus.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,25 @@ instance : Entailment.Cl 𝓔 where
119119

120120
end EmptyEntailment
121121

122+
abbrev Pullback (𝔇 : List F → Type*) {G : Type*} [LogicalConnective G] (f : G →ˡᶜ F) : List G → Type _ := fun Γ ↦ 𝔇 (Γ.map f)
123+
124+
namespace Pullback
125+
126+
variable {G : Type*} [LogicalConnective G] [DeMorgan G] [NegInvolutive G] {f : G →ˡᶜ F}
127+
128+
def cast (d : 𝔇 Δ) (h : Δ = Γ.map f := by simp) : Pullback 𝔇 f Γ := by
129+
unfold Pullback
130+
exact h ▸ d
131+
132+
instance [OneSidedLK 𝔇] : OneSidedLK (Pullback 𝔇 f) where
133+
identity φ := cast <| identity (f φ)
134+
wk {Δ Γ} d h := cast (wk d (List.map_subset f h) : 𝔇 (Γ.map f)) (by simp)
135+
verum := cast verum
136+
and d₁ d₂ := cast <| and d₁ d₂
137+
or d := cast <| or d
138+
139+
end Pullback
140+
122141
protected class Entailment (𝔇 : outParam (List F → Type*)) (S : Type*) [Entailment S F] [AdjunctiveSet F S] where
123142
equiv {𝓢 : S} {φ} : 𝓢 ⊢! φ ≃ (l : {l : List F // ∀ φ ∈ l, φ ∈ 𝓢}) × 𝔇 (φ :: ∼l)
124143

0 commit comments

Comments
 (0)