This page documents Regula 0.8.0. The latest release is Regula 0.11.1: this page in Regula 0.11.1.
RG1003: Unknown transitive axioms are forbidden
- Category Foundation
- Scope declaration
- Subreason
unknown-axiom
A declaration's exact transitive axiom set contains an axiom outside Lean's standard logical foundation (propext, Quot.sound, Classical.choice) that is neither sorryAx nor a compiler-trusting axiom (the Lean.trustCompiler, Lean.ofReduceBool and Lean.ofReduceNat family when the selected compiler declares it, or an authenticated native-proof axiom of native_decide, decide +native, bv_decide, bv_decide? or bv_check).
What to do. Find where the axiom enters (often an imported dependency), and replace that dependency or its axiom with a proof or a hypothesis.
- Requirement
- Every transitive axiom of an owned declaration, including one from an import, is
propext,Quot.soundorClassical.choice. - Reported in
- Enforcement
- Strict, like every rule: see how rules are enforced.
Checked example
Violating input
vendor/Dependency.leansource examples/rules/RG1003/Violation.lean/-! # Dependency
Dependency reflexivity declaration. -/
namespace Dependency
axiom reflexive (n : Nat) : n = n
end Dependency
Unchanged input
Example.leansource examples/rules/RG1003/Example.leanimport Dependency
/-! # Inherited reflexivity
Reflexivity inherited from the dependency. -/
theorem reflexive (n : Nat) : n = n := Dependency.reflexive n
Findings of the violating run
RG1003 error violation fresh project, claim kernel-only
Declaration reflexive at Example.lean (the audit's fresh isolated copy), line 5, column 9
reflexive (theorem) [Prop] type=โ (n : Nat), n = n axioms=["Dependency.reflexive"] -> unknown-axiomCorrection
vendor/Dependency.lean /-! # Dependency
- Dependency reflexivity declaration. -/
- namespace Dependency
- axiom reflexive (n : Nat) : n = n
+ Dependency reflexivity evidence. -/
+ namespace Dependency
+ theorem reflexive (n : Nat) : n = n := rfl
end Dependency
vendor/Dependency.leansource examples/rules/RG1003/Fixed.lean/-! # Dependency
Dependency reflexivity evidence. -/
namespace Dependency
theorem reflexive (n : Nat) : n = n := rfl
end Dependency
The examples are the imported dependency. The dependency proves the same reflexivity statement instead of declaring it as an axiom, and the file that imports it is unchanged.
Checked by a fresh whole-project audit of <example> (axiomGate): violating run rejected, corrected run completed.
How to fix it
-
Inspect the declaration's axiom list in the diagnostic or with
#print axioms, and follow it to the declaration that introduces the axiom. -
Replace the axiom in the dependency with a proof, or make it a hypothesis of the results that need it.
-
If the dependency cannot change, do not claim the affected declarations on a conforming surface.
Why it matters
A foundation label summarizes exactly which assumptions a result rests on. An unclassified axiom has no label, so no profile claim about the declaration can be true.
The three logical labels are Kernel-only (no axioms), Choice-Free (a subset of propext and Quot.sound) and Standard-Logical (additionally Classical.choice). A surface's claim in foundation_manifest.json is the upper bound; each declaration is labeled from its own exact axiom set.
What triggers it
Each axiom in the transitive set is classified. One that is not a standard logical axiom, sorryAx (RG1002) or a compiler-trusting axiom (RG1004) is unknown, and the declaration is rejected with applicability unknown-axiom.
Imported axioms are not exempt: an owned theorem that uses a dependency's axiom is rejected even though the axiom is declared elsewhere.
Required proof shape
After the fix, the exact transitive axiom set is a subset of propext, Quot.sound and Classical.choice and fits the surface claim (RG1005).
What a passing result establishes
Every axiom in the transitive set of each owned declaration is either a standard logical axiom or rejected by a more specific rule.
It does not establish:
-
Anything about the unowned dependency beyond its axioms; imported declarations are a declared trust boundary, identified by the exact dependency state (RG2001).
It leaves these review obligations open: R-QUALIFY.
Limitations and unsupported cases
Classification uses exact constant names and authenticated compiler evidence, not name patterns; a lookalike name gets no special treatment.
Sources
- Normative clauses
- standard ยง7.5 Proof Completeness and Foundation Strength
- Checklist rows
FOUND-03,TYPE-04,THEOREM-01,THEOREM-09,BUILD-01- Detector, policy and proof sources
lean/RegulaCore/Policy.lean,lean/RegulaPolicy/Foundation.lean,lean/RegulaPolicy/Decision.lean- Proved linkage
- The shared declaration decision
RegulaPolicy.declarationFailure(its first failed requirement,declarationFailure_ordered) is mapped to a rule by the injectiveRegula.ruleForFailure. Project, file and documentation audits run it throughRegula.Checker.Policy.checked_memberRule(ruleForMember_eq); the editor runsRegula.Linter.checked_editorDecision. For the same member and request, the editor passes exactly when the project decision selects no rule or only RG1008, which the editor does not render (Regula.Checker.Policy.editor_decision_none_iff), a rule it renders is the project decision's rule (editor_decision_rule), and a pending result withholds a project rule whose failure needs generated-role evidence (editor_decision_pending). The editor's request domain is the project's without teaching (editor_request_sound,editor_request_complete). The observed declaration fields and generated-role evidence are hypotheses of these theorems.