Documentation

Lean.Meta.PPGoal

def Lean.Meta.withPPInaccessibleNamesImp {α : Type} (flag : Bool) (x : Lean.MetaM α) :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.withPPInaccessibleNames {m : TypeType u_1} {α : Type} [inst : MonadControlT Lean.MetaM m] [inst : Monad m] (x : m α) (flag : optParam Bool true) :
m α
Equations
def Lean.Meta.withPPShowLetValuesImp {α : Type} (flag : Bool) (x : Lean.MetaM α) :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.withPPShowLetValues {m : TypeType u_1} {α : Type} [inst : MonadControlT Lean.MetaM m] [inst : Monad m] (x : m α) (flag : optParam Bool true) :
m α
Equations
def Lean.Meta.withPPForTacticGoal {m : TypeType u_1} {α : Type} [inst : MonadControlT Lean.MetaM m] [inst : Monad m] (x : m α) :
m α

Set pretty-printing options (pp.showLetValues = true and pp.inaccessibleNames = true) for visualizing goals.

Equations
structure Lean.Meta.ToHide.State :
Type
  • FVarIds of Propostions with inaccessible names but containing only visible names. We show only their types

    hiddenInaccessibleProp : Lean.FVarIdSet
  • FVarIds with inaccessible names, but not in hiddenInaccessibleProp

    hiddenInaccessible : Lean.FVarIdSet
  • modified : Bool
Instances For
    structure Lean.Meta.ToHide.Context :
    Type
    • If true we make a declaration "visible" if it has visible backward dependencies. Remark: recall that for the Prop case, the declaration is moved to hiddenInaccessibleProp

      backwardDeps : Bool
    • goalTarget : Lean.Expr
    • showLetValues : Bool
    Instances For

      Return true if fvarId is marked as an hidden inaccessible or inaccessible proposition

      Equations

      If fvarId isMarked, then unmark it.

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

      Return true if the given local declaration has a "visible dependency", that is, it contains a free variable that is hiddenInaccessible

      Recall that hiddenInaccessibleProps are visible, only their names are hidden

      Equations

      Return true if the given local declaration has a "nonvisible dependency", that is, it contains a free variable that is hiddenInaccessible or hiddenInaccessibleProp

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

      If e is visible, then any inaccessible in e marked as hidden should be unmarked.

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

      If pp.inaccessibleNames == false, then collect two sets of FVarIds : hiddenInaccessible and hiddenInaccessibleProp 1- hiddenInaccessible contains FVarIds of free variables with inaccessible names that a) are not propositions or b) are propositions containing "visible" names. 2- hiddenInaccessibleProp contains FVarIds of free variables with inaccessible names that are propositions containing "visible" names. Both sets do not contain FVarIds that contain visible backward or forward dependencies. The goalTarget counts as a forward dependency.

      We say a name is visible if it is a free variable with FVarId not in hiddenInaccessible nor hiddenInaccessibleProp

      For propositions in hiddenInaccessibleProp, we show only their types when displaying a goal.

      Remark: when pp.inaccessibleNames == true, we still compute hiddenInaccessibleProp to prevent the goal from being littered with irrelevant names.

      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.Meta.ppGoal.ppVars (indent : Int) (showLetValues : Bool) (hiddenProp : Lean.FVarIdSet) (varNames : List Lean.Name) (prevType? : Option Lean.Expr) (fmt : Lean.Format) (localDecl : Lean.LocalDecl) :
      Equations
      • One or more equations did not get rendered due to their size.