Meta results regarding sorry and pseudo attributions #
i. Overview #
The purpose of this module is to collect all results which depend on the
sorryAx axiom and the Lean.ofReduceBool axiom, and check that these results
are correctly attributed sorryful and pseudo respectively.
ii. Key results #
sorryfulPseudoTest: A test that all results attributedsorryfuldepend on thesorryAxaxiom and vice versa, and all results attributedpseudodepend on theLean.ofReduceBoolaxiom and vice versa.
iii. Table of contents #
- A. Collectings results depending on
sorryAxandLean.ofReduceBool- A.1. The state information to be collected
- A.2. The monad for collecting names
- A.3. The collection function
- A.4. Given an array updating the state with all names depending on axioms
- A.5. Given an array getting all names depending on axioms
- A.6. Getting all names depending on axioms from all user defined constants
- B. Collecting all names attributed
sorryfulandpseudo - C. Testing the
sorryfulandpseudoattributions are correctly applied
iv. References #
Some of the code here is adapted from from the file: Lean.Util.CollectAxioms
copyright (c) 2020 Microsoft Corporation. Authored by Leonardo de Moura.
A. Collectings results depending on sorryAx and Lean.ofReduceBool #
A.1. The state information to be collected #
A structure used for collecting names of results dependent on the
sorryAx axiom and the Lean.ofReduceBool axiom.
- visited : Lean.NameSet
The names which have already been visited as part of the state.
- containsSorry : Lean.NameSet
The names which depend on the
sorryAxaxiom. - containsOfReduceBool : Lean.NameSet
The names which depend on the
Lean.ofReduceBoolaxiom.
Instances For
A.2. The monad for collecting names #
A monad used for collecting names of results dependent on the
sorryAx axiom and the Lean.ofReduceBool axiom.
Instances For
A.3. The collection function #
Given a c : Name updating the monad M based on which results which c uses
depend on the sorryAx axiom and the Lean.ofReduceBool axiom.
A.4. Given an array updating the state with all names depending on axioms #
Given a c : Array Name updating the monad M based on which results
depend on the sorryAx axiom and the Lean.ofReduceBool axiom.
Equations
- PhysLean.CollectSorry.allSorryPseudo c = Array.forM (fun (x : Lean.Name) => PhysLean.CollectSorry.collect x ∅) c
Instances For
A.5. Given an array getting all names depending on axioms #
Given a c : Array Name the names of all results used to defined
the results in c with the sorryAx axiom and the Lean.ofReduceBool axiom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A.6. Getting all names depending on axioms from all user defined constants #
The axioms of a constant.
Equations
- PhysLean.allWithSorryPseudo = do let __do_lift ← PhysLean.allUserConsts let x ← PhysLean.collectSorryPseudo (Array.map (fun (c : Lean.ConstantInfo) => c.name) __do_lift) pure x
Instances For
B. Collecting all names attributed sorryful and pseudo #
All names which are attributed sorryful.
Equations
- One or more equations did not get rendered due to their size.
Instances For
All names which are attributed pseudo.
Equations
- PhysLean.allPseudoAttributed = do let env ← Lean.getEnv let pseudoInfos : Array PseudoInfo := pseudoExtension.getState env pure (Array.map (fun (info : PseudoInfo) => info.name) pseudoInfos)
Instances For
C. Testing the sorryful and pseudo attributions are correctly applied #
Checks whether all results attributed sorryful depend on the ```sorryAx`
axiom and vice versa.
Equations
- One or more equations did not get rendered due to their size.