Documentation

Mathlib.Tactic.Inclusion.Core.Types

Datatypes for the inclusion tactic #

This file defines several datatypes and monads (and some basic API for them) that are used throughout the core of the inclusion tactic.

An IType is a structure that holds the types of an inclusion expression x ∈ s, where the type of x is elemType, the type of s is setType and the ToSet setType elemType instance used is toSetInst.

Instances For

    An IExpr is an expression expr together with a choice of IType used to represent inclusion expressions of the form expr ∈ s.

    Instances For
      structure Inclusion.IVar :

      An IVar is a structure that holds the data of a "free inclusion variable" associated to an inclusion expression iExpr. This includes a pair of variables setVar, hypVar (which are sometimes free variables but often synthetic opaque metavariables), where setVar is a variable for an inclusion set and hypVar is a (variable) proof of iExpr.expr ∈ setVar.

      • iExpr : IExpr

        The inclusion expression represented by the inclusion variable.

      • setVar : Lean.Expr

        The inclusion set variable.

      • hypVar : Lean.Expr

        The variable hypVar : iExpr.expr ∈ setVar.

      • cover? : Option Lean.Expr

        An optional expression of type Cover iVar.type.setType iVar.type.elemType. When present, the inclusion computation is mapped over this cover to reduce the "dependency effect".

      Instances For

        The IType of an IVar.

        Equations
        Instances For

          The associated expression of an IVar.

          Equations
          Instances For

            An ExprInclusion is a structure associated with an expression e, containing a computed inclusion set for e and a proof that this inclusion is correct.

            • inclusion : Lean.Expr

              The expression computing an inclusion set for e.

            • proof : Lean.Expr

              A proof of e ∈ inclusion, where e is the represented expression.

            Instances For

              An ExprInclusionBody is an intermediate structure used in the process of building the ExprInclusion associated to an expression e. It contains an inclusionBody and proofBody which contain the (possibly partially completed) body of the inclusion and proof expressions of the ExprInclusion respectively.

              • inclusionBody : Lean.Expr

                The (possibly partially completed) body of the inclusion expression.

              • proofBody : Lean.Expr

                The (possibly partially completed) proof of e ∈ inclusionBody.

              Instances For

                Convert an IVar to an ExprInclusionBody.

                Equations
                Instances For

                  The fixed context of the InclusionM monad.

                  Instances For

                    The mutable state of the InclusionM monad.

                    • A map from expressions to their inclusion variables.

                    • iVarDisplays : Lean.ExprMap Lean.Expr

                      A map from inclusion set variables to the expressions used to display them in traces.

                    Instances For
                      @[reducible, inline]

                      The monad used by the inclusion tactic during the construction of ExprInclusions.

                      Equations
                      Instances For
                        @[instance_reducible]
                        Equations
                        • One or more equations did not get rendered due to their size.
                        def Inclusion.InclusionM.runWith {α : Type} (x : InclusionM α) (context : Context) (state : State := { }) :

                        Run the InclusionM monad with an explicit context and initial state.

                        Equations
                        Instances For
                          def Inclusion.InclusionM.run {α : Type} (x : InclusionM α) (paramSettings : Lean.NameMap Lean.Expr := ∅) (families : Array Lean.Name := #[]) :

                          Run the InclusionM monad using the current local context.

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

                            The fixed context of the HypothesisM monad.

                            Instances For

                              The mutable state of the HypothesisM monad.

                              Instances For
                                @[reducible, inline]

                                The monad used by the inclusion tactic to construct initial inclusion hypotheses.

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

                                  Run the HypothesisM monad using the context and state of the current InclusionM computation.

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