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.Cslib.Logic.LogicalEquivalence← Cslib.Logic.LogicalEquivalence (Cslib/Foundations/Logic/LogicalEquivalence.lean:23): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 11
- Cslib.DefaultCongruence.r
a ≡ bmeans thataandbare related by the canonical congruence relation for their type. - Cslib.instCongruenceOfDefaultCongruenceCslib.instCongruenceOfDefaultCongruence
- Cslib.CongruenceThe relation
ris a congruence onα. This class gives access to the≡[r]notation. To instantiate a canonical congruence forα,… - Cslib.LawfulCongruenceAn equivalence relation on
αpreserved by all contexts. - Cslib.Congruence.r
a ≡[r] bmeans that theaandbare related by the congruencer. - Cslib.HasContextClass for types (
α) that have a canonical notion of homogeneous single-hole contexts (Context). - Cslib.HasHContextClass for types with a canonical notion of heterogeneous single-hole contexts.
- Cslib.Logic.InferenceSystemThe notation typeclass for inference systems. This enables the notation
S⇓a, whereSis a tag for the inference system anda : αis… - Cslib.HasContext.ContextCslib.HasContext.Context
- Cslib.Logic.CLL.Proposition.Context.fillReplaces the hole in a propositional context with a propositions.
- Cslib.Logic.CLL.Sequent.Context.fillFilling a judgemental context returns a sequent.
- Cslib.DefaultCongruence.r
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])