This PR implements RFC #12216: native computation (`native_decide`, `bv_decide`) is represented in the logic as one axiom per computation, asserting the equality that was obtained from the native computation. `#print axiom` will no longer show `Lean.trustCompiler`, but rather the auto-generated names of these axioms (with, for example, `._native.bv_decide.` in the name). See the RFC for more information. This PR introduces a common MetaM helper (`nativeEqTrue`) used by `native_decide` and `bv_decide` alike that runs the computation and then asserts the result using an axiom. It also deprecated the `ofReduceBool` axioms etc. Not included in this PR is infrastructure for enumerating these axioms, prettier `#print axioms` (should we want his) and tactic concurrency. Fixes #12216.
12 lines
216 B
Text
12 lines
216 B
Text
/-!
|
|
Panic during evaluation
|
|
-/
|
|
|
|
inductive ItsTrue2 : Prop
|
|
| mk
|
|
|
|
instance : Decidable ItsTrue2 :=
|
|
have : Inhabited (Decidable ItsTrue2) := ⟨isTrue .mk⟩
|
|
panic! "oh no"
|
|
|
|
example : ItsTrue2 := by native_decide
|