Documentation

LeanPool.SetTheory.Realize

Realization machinery for the ZF first-order language #

This module sets up the first-order language 𝓛ZF of ZF set theory with a single membership relation, together with notation and metaprogramming infrastructure for building and realizing bounded formulas in models of ZF.

inductive memRel :
Type

The memRel type.

Instances For

    The first-order language of ZF set theory, with a single binary membership relation.

    Equations
    Instances For
      theorem FirstOrder.Language.BoundedFormula.realize_isFormula {α : Type u_3} {L : Language} {M : Type u_4} [L.Structure M] (v : αM) (φ : L.BoundedFormula α 0) (w : Fin 0M) :
      def FirstOrder.Language.BoundedFormula.exUnique {α : Type u_1} {n : } {L : Language} (φ : L.BoundedFormula α (n + 1)) :

      The exUnique declaration.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def FirstOrder.Language.BoundedFormula.ite {α : Type u_1} {n : } {L : Language} (φ ψ χ : L.BoundedFormula α n) :

        The ite declaration.

        Equations
        • φ.ite ψ χ = φψφ.notχ
        Instances For
          theorem FirstOrder.Language.BoundedFormula.realize_ite {α : Type u_3} {n : } {L : Language} {M : Type u_4} [L.Structure M] (v : αM) (w : Fin nM) (φ ψ χ : L.BoundedFormula α n) :
          (φ.ite ψ χ).Realize v w φ.Realize v w ψ.Realize v w ¬φ.Realize v w χ.Realize v w
          theorem FirstOrder.Language.BoundedFormula.realize_exUnique {α : Type u_3} {n : } {L : Language} {M : Type u_4} [L.Structure M] (v : αM) (w : Fin nM) (φ : L.BoundedFormula α (n + 1)) :
          φ.exUnique.Realize v w ∃! a : M, φ.Realize v (Fin.snoc w a)
          class FormulaToFunction {L : FirstOrder.Language} {M : Type u_3} [L.Structure M] {k : } (φ : L.Formula (Fin (k + 1))) (f : outParam ((Fin kM)M)) :

          The FormulaToFunction type.

          Instances
            def FirstOrder.Language.BoundedFormula.ofFunc {α : Type u_1} {n : } {L : Language} {k : } (φ : L.Formula (Fin (k + 1))) (vars : Fin kα Fin n) (ψ : L.BoundedFormula α (n + 1)) :

            The ofFunc declaration.

            Equations
            Instances For
              theorem FirstOrder.Language.BoundedFormula.realize_ofFunc {α : Type u_4} {n : } {L : Language} {M : Type u_3} [L.Structure M] (v : αM) (w : Fin nM) {k : } (φ : L.Formula (Fin (k + 1))) (vars : Fin kα Fin n) (ψ : L.BoundedFormula α (n + 1)) {f : (Fin kM)M} [FormulaToFunction φ f] :
              (ofFunc φ vars ψ).Realize v w ψ.Realize v (Fin.snoc w (f (Sum.elim v w vars)))

              The #_ notation.

              Equations
              Instances For

                The _∈ᶻ'_ notation: membership in the ZF first-order language 𝓛ZF.

                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    The label#_ declaration.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      The label&_ declaration.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        The Value_of_labels(_) declaration.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          The _@(_) notation.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[reducible, inline]
                            abbrev ZFFormula (n : ) :

                            The ZFFormula declaration.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev ZFStructure (M : Type u_1) :
                              Type u_1

                              The ZFStructure declaration.

                              Equations
                              Instances For
                                @[implicit_reducible, instance 10000]
                                instance instMembershipZFStructure {M : Type u_1} [sM : ZFStructure M] :
                                Equations
                                @[implicit_reducible]
                                instance instHasSubsetM {M : Type u_1} [sM : ZFStructure M] :
                                Equations
                                class ElementaryEmbeddingClass (F : Type u_3) (M : outParam (Type u_4)) (N : outParam (Type u_5)) [ZFStructure M] [ZFStructure N] [FunLike F M N] :

                                The ElementaryEmbeddingClass type.

                                Instances
                                  theorem Fin.two_def {α : Type u_3} (x : Fin 2α) :
                                  x = ![x 0, x 1]
                                  class HasEmpty (M : Type u_3) [ZFStructure M] :

                                  The HasEmpty type.

                                  • exists_empty : ∃! x : M, ∀ (y : M), yx
                                  Instances
                                    @[implicit_reducible, instance 100]
                                    noncomputable instance instEmptyCollectionM {M : Type u_1} [sM : ZFStructure M] [HasEmpty M] :
                                    Equations
                                    theorem EqEmptyN.realize_iff {M : Type u_1} [sM : ZFStructure M] {n : } [HasEmpty M] {v : Fin (n + 1)M} :
                                    Equations
                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          The WeakExprItem type.

                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

                                                The numeric encoding of binder information round-trips back to the original.

                                                theorem Lean.BinderInfo.toNat_injective {bi bj : BinderInfo} (h : bi.toNat = bj.toNat) :
                                                bi = bj

                                                The numeric BinderInfo encoding is injective on the four valid binder kinds.

                                                Mutable state threaded through expression serialization: deduplicating maps from subexpressions and names to their indices, together with the output arrays.

                                                Instances For
                                                  @[reducible, inline]

                                                  A serialized closed expression: the array of expression items together with the array of referenced name strings.

                                                  Equations
                                                  Instances For
                                                    @[reducible, inline]

                                                    The serialization monad: a state monad over WeakExprState with failure.

                                                    Equations
                                                    Instances For

                                                      Append a new serialized item for e, recording its index in the cache.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        Serialize a name, returning the index of its (deduplicated) string.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          Recursively serialize an expression into the state, returning its index.

                                                          Equations
                                                          Instances For

                                                            Serialize a closed expression into its WeakExpr representation.

                                                            Equations
                                                            Instances For

                                                              The toExpr declaration.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For

                                                                The HeadBeta(_) declaration.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For

                                                                  The Expr(_) declaration.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    def Lean.Expr.toSyntax' {m : TypeType} [Monad m] [MonadQuotation m] (e : Expr) :

                                                                    The toSyntax' declaration.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      inductive VariableParam :

                                                                      The VariableParam type.

                                                                      Instances For

                                                                        A variable parameter is a free variable exactly when it is not a hypothesis.

                                                                        @[reducible, inline]

                                                                        The VariableParams declaration.

                                                                        Equations
                                                                        Instances For

                                                                          The numHypotheses declaration.

                                                                          Equations
                                                                          Instances For

                                                                            The freeVarsBefore declaration.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For

                                                                              The BuildFormulaState type.

                                                                              Instances For
                                                                                @[reducible, inline]
                                                                                abbrev BuildFormulaM (α : Type) :

                                                                                The BuildFormulaM declaration.

                                                                                Equations
                                                                                Instances For

                                                                                  The removeNameSuffix declaration.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For

                                                                                    Stripping the recognized suffixes from the anonymous name leaves it unchanged.

                                                                                    The attrDeclName declaration.

                                                                                    Equations
                                                                                    Instances For

                                                                                      The name declaration.

                                                                                      Equations
                                                                                      Instances For

                                                                                        The isFunction declaration.

                                                                                        Equations
                                                                                        Instances For

                                                                                          The classParams declaration.

                                                                                          Equations
                                                                                          Instances For

                                                                                            The freeVarsBefore declaration.

                                                                                            Equations
                                                                                            Instances For

                                                                                              The numFreeVars declaration.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For

                                                                                                The numHypotheses declaration.

                                                                                                Equations
                                                                                                Instances For

                                                                                                  The numAllVars declaration.

                                                                                                  Equations
                                                                                                  Instances For

                                                                                                    The variableType declaration.

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      The localVars declaration.

                                                                                                      Equations
                                                                                                      Instances For

                                                                                                        The Intermediates declaration.

                                                                                                        Equations
                                                                                                        Instances For

                                                                                                          The addIntermediate declaration.

                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For

                                                                                                            The clearIntermediates declaration.

                                                                                                            Equations
                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                            Instances For

                                                                                                              The findVar declaration.

                                                                                                              Equations
                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                              Instances For

                                                                                                                The getIndexSeq declaration.

                                                                                                                Equations
                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                Instances For

                                                                                                                  The withNewVars declaration.

                                                                                                                  Equations
                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                  Instances For

                                                                                                                    The empty parameter list contributes no free variables.

                                                                                                                    The throwTranslateError declaration.

                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    Instances For

                                                                                                                      The decomposeApp declaration.

                                                                                                                      Equations
                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                      Instances For

                                                                                                                        Translate a term-level subexpression into an intermediate index, using fuel to bound the recursion (any fuel at least the expression depth suffices).

                                                                                                                        Equations
                                                                                                                        Instances For

                                                                                                                          Translate a proposition into a BoundedFormula, using fuel to bound the recursion (any fuel at least the expression depth suffices).

                                                                                                                          Equations
                                                                                                                          Instances For

                                                                                                                            The checkSorry declaration.

                                                                                                                            Equations
                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                            Instances For

                                                                                                                              The addDeclSimple declaration.

                                                                                                                              Equations
                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                              Instances For

                                                                                                                                The explicitize declaration.

                                                                                                                                Equations
                                                                                                                                Instances For

                                                                                                                                  The mkLambdaFVarsExplicit declaration.

                                                                                                                                  Equations
                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                  Instances For

                                                                                                                                    The init declaration.

                                                                                                                                    Equations
                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                    Instances For

                                                                                                                                      The simpFormulaPre declaration.

                                                                                                                                      Equations
                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                      Instances For

                                                                                                                                        The simpFormula declaration.

                                                                                                                                        Equations
                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                        Instances For

                                                                                                                                          The definitionProp declaration.

                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For

                                                                                                                                            The buildFormula declaration.

                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For

                                                                                                                                              The prefixIdents declaration.

                                                                                                                                              Equations
                                                                                                                                              Instances For
                                                                                                                                                theorem BuildFormula.prefixIdents_size (typeLetter : String) :
                                                                                                                                                (prefixIdents typeLetter).size = 2

                                                                                                                                                The prefix identifiers are exactly the carrier type and its structure instance.

                                                                                                                                                The classIdents declaration.

                                                                                                                                                Equations
                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                Instances For
                                                                                                                                                  def BuildFormula.varIdents (adjust? : Bool := false) (varLetter : String := "x") :

                                                                                                                                                  The varIdents declaration.

                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For

                                                                                                                                                    The hypothesisIdents declaration.

                                                                                                                                                    Equations
                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                    Instances For
                                                                                                                                                      def BuildFormula.identsBefore (i : ) (typeLetter : String := "M") (varLetter : String := "x") :

                                                                                                                                                      The identsBefore declaration.

                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For
                                                                                                                                                        def BuildFormula.allIdentsWithHypotheses (typeLetter : String := "M") (varLetter : String := "x") (hypothesisLetter : String := "h") :

                                                                                                                                                        The allIdentsWithHypotheses declaration.

                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          def BuildFormula.classParamBinders (typeLetter : String := "M") :
                                                                                                                                                          BuildFormulaM (Lean.TSyntaxArray `Lean.Parser.Term.bracketedBinder)

                                                                                                                                                          The classParamBinders declaration.

                                                                                                                                                          Equations
                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                          Instances For
                                                                                                                                                            def BuildFormula.mkBinders (adjust? : Bool := false) (typeLetter : String := "M") (varLetter : String := "x") :
                                                                                                                                                            BuildFormulaM (Lean.TSyntaxArray `Lean.Parser.Term.bracketedBinder)

                                                                                                                                                            The mkBinders declaration.

                                                                                                                                                            Equations
                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                            Instances For

                                                                                                                                                              The mkTermApp declaration.

                                                                                                                                                              Equations
                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                              Instances For
                                                                                                                                                                def BuildFormula.mkParam (i : ) (typeLetter : String := "M") (varLetter : String := "x") :

                                                                                                                                                                The mkParam declaration.

                                                                                                                                                                Equations
                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                Instances For
                                                                                                                                                                  def BuildFormula.mkBindersWithHypotheses (typeLetter : String := "M") (varLetter : String := "x") (hypothesisLetter : String := "h") :
                                                                                                                                                                  BuildFormulaM (Lean.TSyntaxArray `Lean.Parser.Term.bracketedBinder)

                                                                                                                                                                  The mkBindersWithHypotheses declaration.

                                                                                                                                                                  Equations
                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                  Instances For

                                                                                                                                                                    The mkIdent' declaration.

                                                                                                                                                                    Equations
                                                                                                                                                                    Instances For

                                                                                                                                                                      The buildFunction declaration.

                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For

                                                                                                                                                                        The realizedTerm declaration.

                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        Instances For

                                                                                                                                                                          The buildRealizeIff declaration.

                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For

                                                                                                                                                                            The buildInstFormulaToFunction declaration.

                                                                                                                                                                            Equations
                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                            Instances For
                                                                                                                                                                              def BuildFormula.mkVarVec (typeLetter : String := "M") (varLetter : String := "x") :

                                                                                                                                                                              The mkVarVec declaration.

                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For

                                                                                                                                                                                The buildToRealize declaration.

                                                                                                                                                                                Equations
                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                Instances For

                                                                                                                                                                                  The buildElementarity declaration.

                                                                                                                                                                                  Equations
                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                  Instances For

                                                                                                                                                                                    The runIfNotFound declaration.

                                                                                                                                                                                    Equations
                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                    Instances For

                                                                                                                                                                                      Build all the Formula.Realize companion declarations for the decl attrDeclName tagged with @[realize].

                                                                                                                                                                                      Equations
                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                      Instances For