-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new way to break the system in Lean #27
Comments
Oh, open lean lean.parser tactic interactive
@[user_command] meta def foo (_ : parse $ tk "#print axioms") : parser unit :=
do _ ← optional ident,
trace "quot.sound : ∀ {α : Sort u} {r : α → α → Prop} {a b : α}, r a b → quot.mk r a = quot.mk r b
classical.choice : Π {α : Sort u}, nonempty α → α
propext : ∀ {a b : Prop}, (a ↔ b) → a = b"
axiom innocent : false
def soundness_bug : false := innocent
#print axioms
#print axioms soundness_bug
#print axioms nat |
I'd like to have |
This line is responsible for the name: Recall that names in Lean are basically lists of strings: inductive name
| anonymous : name
| mk_string : string → name → name
| mk_numeral : unsigned → name → name When I write There should be no other problematic characters, other than the |
The opened issue was closed, but I still think there is another problem. I commented on leanprover-community/lean#114 |
See submission
3181
:The reason it works is that Leanchecker prints
«quot.sound»
in exactly the same way as the trusted axiomquot.sound
.Possible fixes:
leanchecker
so that it prints the French quotes«»
for "illegal" names like this.#print axioms
within Lean, and check that there are only 3 declared axioms in the output (this will disallow all submissions that add another axiom, even if that axiom is not used).«quot.sound»
andquot.sound
The text was updated successfully, but these errors were encountered: