File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ private def isSimpleRflProof (proof : Expr) : Bool :=
6262 else
6363 proof.isAppOfArity ``rfl 2
6464
65+ private def looksLikeRelevantTheoremProofType (type : Expr) : Bool :=
66+ if let .forallE _ _ type _ := type then
67+ looksLikeRelevantTheoremProofType type
68+ else
69+ type.isAppOfArity ``WellFounded 2
70+
6571def addDecl (decl : Declaration) : CoreM Unit := do
6672 -- register namespaces for newly added constants; this used to be done by the kernel itself
6773 -- but that is incompatible with moving it to a separate task
@@ -78,7 +84,9 @@ def addDecl (decl : Declaration) : CoreM Unit := do
7884 let mut exportedKind? := none
7985 let (name, info, kind) ← match decl with
8086 | .thmDecl thm =>
81- if (← getEnv).header.isModule && !isSimpleRflProof thm.value then
87+ if (← getEnv).header.isModule && !isSimpleRflProof thm.value &&
88+ -- TODO: this is horrible...
89+ !looksLikeRelevantTheoremProofType thm.type then
8290 exportedInfo? := some <| .axiomInfo { thm with isUnsafe := false }
8391 exportedKind? := some .axiom
8492 pure (thm.name, .thmInfo thm, .thm)
You can’t perform that action at this time.
0 commit comments