Zulip Chat Archive
Stream: general
Topic: shadowing prelude operations
Thorsten Altenkirch (Oct 17 2025 at 12:35):
For my logic course I would like to redefine some operations from the prelude for pedagogical reasons (! , & , |, * , +). This worked in lean 3 but seems to cause problems in lean 4.
E.g. I write
local prefix:90 "!" => not
local infixl:50 " && " => and
local infixl:40 " || " => or
but when I use them I get an ambigious term error:
theorem b_dm2 : ∀ b c : Bool,
(! (b && c)) = (!b || ! c) := by sorry
Is there a straightforward way to fix that?
Floris van Doorn (Oct 17 2025 at 12:40):
local prefix:90 (priority := high) "!" => not
local infixl:50 (priority := high) " && " => and
local infixl:40 (priority := high) " || " => or
Last updated: Dec 20 2025 at 21:32 UTC