AFTD Auto-Formalizing Theoretical Domains

Cslib.Logic.LogicalEquivalence

classimported Lean

A logical equivalence eqv for an inference system S is a congruence on propositions (of type α) that preserves validity of judgements under any judgemental context.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
class Cslib.Logic.LogicalEquivalence S (eqv : α → α → Prop)
    [HasContext α] [Congruence eqv] [HasHContext Judgement α] [InferenceSystem S Judgement]
    extends LawfulCongruence eqv
Defined in
CSLib, `Cslib.Logic.LogicalEquivalence`
Lean proof
By Fabrizio Montesi, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Fabrizio Montesi. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
none listed
Built on 11

Lean source view module on GitHub

set_option quotPrecheck false
open Cslib
@[inherit_doc]
local notation:29 a " ≡[" r "] " b => Congruence.r r a b
open Cslib
@[inherit_doc]
local infix:29 " ≡ " => DefaultCongruence.r
open Cslib
@[inherit_doc] local notation:max c "<[" t "]" => HasHContext.fill c t
open Cslib Cslib.Logic Cslib.Logic.InferenceSystem
@[inherit_doc] local notation S:90 "⇓" a:90 => InferenceSystem.derivation S a
open Cslib Cslib.Logic Cslib.Logic.InferenceSystem
@[inherit_doc] local notation "⇓" a:90 => InferenceSystem.derivation Default a

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- A logical equivalence `eqv` for an inference system `S` is a congruence on propositions (of type `α`) that preserves validity of judgements under any judgemental context. -/
class Cslib.Logic.LogicalEquivalence S (eqv : α → α → Prop)
    [HasContext α] [Congruence eqv] [HasHContext Judgement α] [InferenceSystem S Judgement]
    extends LawfulCongruence eqv where
  /-- Validity is preserved for any judgemental context. -/
  eqvFillValid (heqv : a ≡[eqv] b) (c : HasHContext.Context Judgement α)
    (h : S⇓(c<[a])) : S⇓(c<[b])
See it in the graphDiscuss this resultChallenge it