While this submission is a draft, it cannot be used by other submissions.

Translation to pure second-order logic

Lax369799.SetLogicTranslation · concepts/Lax369799/SetLogicTranslation.lean · lax-369799

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    Vertex variables are represented by singleton-valued set variables. A vertex quantifier becomes a set quantifier restricted to singletons; the other atomic predicates have their usual singleton interpretations.

    Concept map
    5 concepts; 7 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax369799.SetLogic
    2
    3/-!
    4---
    5title: Translation to pure second-order logic
    6type: theorem
    7---
    8Vertex variables are represented by singleton-valued set variables. A
    9vertex quantifier becomes a set quantifier restricted to singletons; the
    10other atomic predicates have their usual singleton interpretations.
    11-/
    12namespace Lax369799.SetLogicTranslation
    13open TransitionSystems
    14
    15def translate {P : Type} : {m n : ℕ} → MonadicSecondOrder.Formula P m n →
    16 {X : Type} → (Fin m → X) → (Fin n → X) → SetLogic.Formula P X
    17 | _, _, .equal x y, _, xv, _ => (SetLogic.Formula.subset (xv x) (xv y)).conj (.subset (xv y) (xv x))
    18 | _, _, .initial x, _, xv, _ => .initial (xv x)
    19 | _, _, .proposition p x, _, xv, _ => .proposition p (xv x)
    20 | _, _, .edge x y, _, xv, _ => .edge (xv x) (xv y)
    21 | _, _, .member x Y, _, xv, sv => .subset (xv x) (sv Y)
    22 | _, _, .neg φ, _, xv, sv => .neg (translate φ xv sv)
    23 | _, _, .disj φ ψ, _, xv, sv => .disj (translate φ xv sv) (translate ψ xv sv)
    24 | _, _, .existsVertex φ, _, xv, sv => .existsSet
    25 ((SetLogic.Formula.singleton .none).conj (translate φ (Fin.cases .none (fun i => .some (xv i))) (fun i => .some (sv i))))
    26 | _, _, .existsSet φ, _, xv, sv => .existsSet
    27 (translate φ (fun i => .some (xv i)) (Fin.cases .none (fun i => .some (sv i))))
    28
    29axiom correct {P X : Type} {m n : ℕ} (S : TransitionSystem P)
    30 (φ : MonadicSecondOrder.Formula P m n) (xv : Fin m → X) (sv : Fin n → X)
    31 (σ : X → Set S.Vertex) (ρ : Fin m → S.Vertex) (τ : Fin n → Set S.Vertex)
    32 (hx : ∀ i, σ (xv i) = {ρ i}) (hs : ∀ i, σ (sv i) = τ i) :
    33 (translate φ xv sv).eval S σ ↔ φ.eval S ρ τ
    34
    35end Lax369799.SetLogicTranslation
    36
    Show Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…