MatchingLogic.SortedProof #
Free variables, at a sort #
The free variables of a many-sorted pattern, paired with the sort at which they occur.
Equations
- MatchingLogic.Sorted.MFV (MatchingLogic.Sorted.MPattern.var x_2 x✝) = {(x✝, x_2)}
- MatchingLogic.Sorted.MFV MatchingLogic.Sorted.MPattern.bot = ∅
- MatchingLogic.Sorted.MFV (MatchingLogic.Sorted.MPattern.app σ f) = ⋃ (i : Fin (S.arity σ)), MatchingLogic.Sorted.MFV (f i)
- MatchingLogic.Sorted.MFV (a.imp b) = MatchingLogic.Sorted.MFV a ∪ MatchingLogic.Sorted.MFV b
- MatchingLogic.Sorted.MFV (MatchingLogic.Sorted.MPattern.ex x_3 s' a) = MatchingLogic.Sorted.MFV a \ {(s', x_3)}
Instances For
Application contexts, at sorts #
C ::= □ | σ(φ₁, …, C, …, φₙ), tracking both the hole's sort and the
context's result sort.
- hole {S : MSignature} {Var : Type} {s : S.Srt} : MAppCtx S Var s s
- node {S : MSignature} {Var : Type} {sh : S.Srt} (σ : S.Sym) (i : Fin (S.arity σ)) : ((j : Fin (S.arity σ)) → MPattern S Var (S.argSort σ j)) → MAppCtx S Var sh (S.argSort σ i) → MAppCtx S Var sh (S.resSort σ)
Instances For
C[φ].
Equations
- MatchingLogic.Sorted.MAppCtx.hole.plug x✝ = x✝
- (MatchingLogic.Sorted.MAppCtx.node σ i args c).plug x✝ = MatchingLogic.Sorted.MPattern.app σ (Function.update args i (c.plug x✝))
Instances For
Variable-for-variable substitution, at a sort #
φ[y/x] where x and y are variables of sort s'. As in the one-sorted
development, substitution is variable-for-variable only and capture-avoidance is
a side condition rather than a renaming.
Equations
- One or more equations did not get rendered due to their size.
- MatchingLogic.Sorted.msubstVar s' x y (MatchingLogic.Sorted.MPattern.var x_3 x✝) = if x✝ = s' ∧ x_3 = x then MatchingLogic.Sorted.MPattern.var y x✝ else MatchingLogic.Sorted.MPattern.var x_3 x✝
- MatchingLogic.Sorted.msubstVar s' x y MatchingLogic.Sorted.MPattern.bot = MatchingLogic.Sorted.MPattern.bot
- MatchingLogic.Sorted.msubstVar s' x y (MatchingLogic.Sorted.MPattern.app σ f) = MatchingLogic.Sorted.MPattern.app σ fun (i : Fin (S.arity σ)) => MatchingLogic.Sorted.msubstVar s' x y (f i)
- MatchingLogic.Sorted.msubstVar s' x y (a.imp b) = (MatchingLogic.Sorted.msubstVar s' x y a).imp (MatchingLogic.Sorted.msubstVar s' x y b)
Instances For
Capture-avoidance for msubstVar, with the same three alternatives as the
one-sorted CaptureFree: the substitution stops here, or it changes nothing
here, or this binder cannot capture y. The middle alternative is the one an
audit had to restore in the one-sorted case.
Equations
- One or more equations did not get rendered due to their size.
- MatchingLogic.Sorted.MCaptureFree s' x y (MatchingLogic.Sorted.MPattern.var x_3 x✝) = True
- MatchingLogic.Sorted.MCaptureFree s' x y MatchingLogic.Sorted.MPattern.bot = True
- MatchingLogic.Sorted.MCaptureFree s' x y (MatchingLogic.Sorted.MPattern.app σ f) = ∀ (i : Fin (S.arity σ)), MatchingLogic.Sorted.MCaptureFree s' x y (f i)
- MatchingLogic.Sorted.MCaptureFree s' x y (a.imp b) = (MatchingLogic.Sorted.MCaptureFree s' x y a ∧ MatchingLogic.Sorted.MCaptureFree s' x y b)
Instances For
Figure 2, many-sorted #
Propositional tautology instances, at a sort.
Equations
Instances For
Γ ⊢ φ for a many-sorted theory Γ, all of whose members have sort sΓ.
The rules are those of Figure 2, taken "at each symbol and each argument
position", with the premise at the sort of that position and the conclusion at
the symbol's result sort.
- hyp {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {φ : MPattern S Var sΓ} : φ ∈ Γ → MProvable Γ φ
- taut {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {s : S.Srt} {p : PForm} {θ : ℕ → MPattern S Var s} : p.Taut → MProvable Γ (substPF θ p)
- mp {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {s : S.Srt} {φ₁ φ₂ : MPattern S Var s} : MProvable Γ φ₁ → MProvable Γ (φ₁.imp φ₂) → MProvable Γ φ₂
- exQuant {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {s s' : S.Srt} {x y : Var} {φ : MPattern S Var s} : MCaptureFree s' x y φ → MProvable Γ ((msubstVar s' x y φ).imp (MPattern.ex x s' φ))
- exGen {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {s s' : S.Srt} {x : Var} {φ₁ φ₂ : MPattern S Var s} : MProvable Γ (φ₁.imp φ₂) → (s', x) ∉ MFV φ₂ → MProvable Γ ((MPattern.ex x s' φ₁).imp φ₂)
- propBot {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {σ : S.Sym} {i : Fin (S.arity σ)} {args : (a : Fin (S.arity σ)) → MPattern S Var (S.argSort σ a)} : MProvable Γ ((MPattern.app σ (Function.update args i MPattern.bot)).imp MPattern.bot)
- propOr {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {σ : S.Sym} {i : Fin (S.arity σ)} {args : (a : Fin (S.arity σ)) → MPattern S Var (S.argSort σ a)} {φ₁ φ₂ : MPattern S Var (S.argSort σ i)} : MProvable Γ ((MPattern.app σ (Function.update args i (φ₁.orP φ₂))).imp ((MPattern.app σ (Function.update args i φ₁)).orP (MPattern.app σ (Function.update args i φ₂))))
- propEx {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {σ : S.Sym} {i : Fin (S.arity σ)} {args : (a : Fin (S.arity σ)) → MPattern S Var (S.argSort σ a)} {s' : S.Srt} {x : Var} {φ : MPattern S Var (S.argSort σ i)} : (∀ (j : Fin (S.arity σ)), j ≠ i → (s', x) ∉ MFV (args j)) → MProvable Γ ((MPattern.app σ (Function.update args i (MPattern.ex x s' φ))).imp (MPattern.ex x s' (MPattern.app σ (Function.update args i φ))))
- framing {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {σ : S.Sym} {i : Fin (S.arity σ)} {args : (a : Fin (S.arity σ)) → MPattern S Var (S.argSort σ a)} {φ₁ φ₂ : MPattern S Var (S.argSort σ i)} : MProvable Γ (φ₁.imp φ₂) → MProvable Γ ((MPattern.app σ (Function.update args i φ₁)).imp (MPattern.app σ (Function.update args i φ₂)))
- existence {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {s : S.Srt} {x : Var} : MProvable Γ (MPattern.ex x s (MPattern.var x s))
- singleton {S : MSignature} {Var : Type} [DecidableEq S.Srt] [DecidableEq Var] {sΓ : S.Srt} {Γ : Set (MPattern S Var sΓ)} {sh st : S.Srt} {x : Var} {φ : MPattern S Var sh} (C₁ C₂ : MAppCtx S Var sh st) : MProvable Γ ((C₁.plug ((MPattern.var x sh).and φ)).imp (C₂.plug ((MPattern.var x sh).and φ.nt)).nt)
Instances For
Sort feeding #
s feeds t: s = t, or some symbol has an argument of sort s and
result sort t (paper, Section 8).
Equations
Instances For
Many-sorted soundness, assumed as the paper does #
(S) at many sorts. The paper cites this to [3, Thm. 13] rather than
proving it; our one-sorted soundness is proved, this is not.
NARROWER THAN THE PAPER, deliberately: this quantifies only over HOMOGENEOUS
theories, whereas the paper's many-sorted theories may mix sorts. That is
exactly sufficient for Proposition 30, whose Γ is a singleton at sort a, and
it keeps the induction below stated in terms of a single sΓ. An audit flagged
the narrowing, so it is recorded here rather than silent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Proposition 30, third claim #
Every line of a derivation whose sort does not feed back to sΓ is
derivable from the axioms alone: a hypothesis line has sort sΓ, and no rule
carries an sΓ premise into a conclusion of a sort that sΓ does not feed.
Proposition 30, third claim. Γ ⊬ φ.
φ has sort c, and a feeds only a, so any derivation of φ from Γ
would be a derivation from no hypotheses; soundness would then make φ valid,
and it is not — take M_b = {r, s} with g_M(r) ≠ g_M(s).
Corollary 31, at the Proposition 30 data.
The paper states Corollary 31 in general: "There is no translation from
many-sorted definedness-free matching logic into any one-sorted definedness-free
matching logic that preserves global consequence and reflects derivability."
Its proof is one line — preservation, then Corollary 15 in the target, then
reflection would give Γ ⊢ φ.
What is stated here is the counterexample instance, not the general statement: there is no target signature and pair of translations that works for the Proposition 30 data. A full rendering would define a translation on the whole source language and state preservation and reflection generally; this is the lemma that instance argument needs, and the general form is future work.
Three hypotheses are load-bearing and were all missing from a first draft of this statement, which an audit showed to be concretely FALSE without them:
hxy : x ≠ y— without itφ3collapses to a derivable pattern, and the existential body is inhabited;StrongLocalCompleteness T Var— (L) must hold in the target, since the paper's proof applies Corollary 15 there. A first draft required it of an unrelated fixed signature;- closedness of the translated patterns, which
global_completenessrequires.