Renaming and weakening free relation variables #
Formula.relabelRel renames outer relation variables by an arity-preserving map, leaving every
locally bound relation and all first-order variables unchanged. Formula.weakenRel specializes
this to adding an unused relation context, so reusable formulas can move beneath new binders
without reconstructing their relation atoms.
Main results #
Formula.realize_relabelRel: renaming pulls back the relation valuation.Formula.checkPolarity_relabelRel: polarity checks pull back the marking.Formula.wellFormed_relabelRel: renaming preserves formation checks, even for noninjective maps.Formula.realize_weakenRel: new relation values do not affect a weakened formula.
def Cslib.Logic.FO.Operator.Formula.relabelRel {L : FirstOrder.Language} {O : Type s} {shape : O → Shape} {Γ Δ : List ℕ} {α : Type w} :
Rename only free relation variables, fixing local binders and all first-order variables.
Instances For
@[simp]
theorem Cslib.Logic.FO.Operator.Formula.realize_relabelRel {L : FirstOrder.Language} {O : Type s} {shape : O → Shape} {Γ Δ : List ℕ} {α : Type w} {M : Type z} [L.Structure M] (I : Interpretation shape M) (φ : Formula L shape Γ α) (f : {k : ℕ} → RelVar Γ k → RelVar Δ k) (ρ : RelEnv Δ M) (v : α → M) :
Relabeling relations is interpreted by pulling back their valuation.
@[simp]
theorem Cslib.Logic.FO.Operator.Formula.checkPolarity_relabelRel {L : FirstOrder.Language} {O : Type s} {shape : O → Shape} {Γ Δ : List ℕ} {α : Type w} (variance : Variances shape) (φ : Formula L shape Γ α) (f : {k : ℕ} → RelVar Γ k → RelVar Δ k) (sign : Bool) (mark : Marking Δ) :
(checkPolarity variance (relabelRel (fun {k : ℕ} => f) φ) sign fun {k : ℕ} => mark) = checkPolarity variance φ sign fun {x : ℕ} (r : RelVar Γ x) => mark (f r)
The polarity of renamed relations is checked using the pulled-back marking.
@[simp]
theorem Cslib.Logic.FO.Operator.Formula.wellFormed_relabelRel {L : FirstOrder.Language} {O : Type s} {shape : O → Shape} {Γ Δ : List ℕ} {α : Type w} (policy : Policy shape) (φ : Formula L shape Γ α) (f : {k : ℕ} → RelVar Γ k → RelVar Δ k) :
Relation renaming leaves all locally checked formation conditions unchanged.
@[simp]
theorem Cslib.Logic.FO.Operator.Formula.realize_weakenRel {L : FirstOrder.Language} {O : Type s} {shape : O → Shape} {Γ : List ℕ} {α : Type w} {M : Type z} [L.Structure M] (I : Interpretation shape M) (Λ : List ℕ) (φ : Formula L shape Γ α) (δ : RelEnv Λ M) (ρ : RelEnv Γ M) (v : α → M) :
New relation values do not affect a weakened formula.