Zulip Chat Archive
Stream: new members
Topic: Remove core lib definition from local context
Michael Palm (Aug 26 2022 at 08:24):
Hi,
is it possible to remove a definition from the core lib from the local context?
To be precise, I find the def not (a : Prop) := a → false
definition unpleasant.
I would prefer to define constant not : Prop → Prop
and define an axiom
axiom not.intro {A : Prop} : (A → false) → ¬A
Is that possible? Are there obvious drawbacks? I do not require mathlib or anything else beyond the core lib... (at least I think so :-D)
Kind regards,
Michael
Ruben Van de Velde (Aug 26 2022 at 08:30):
I suspect getting used to it will be the more productive approach
Andrew Yang (Aug 26 2022 at 08:35):
You can start your file with a line
prelude
which will hide the definitions from the core lib.
Andrew Yang (Aug 26 2022 at 08:36):
Regarding the not
, you will also need an not.elim {A B : Prop} : ¬A → A → B
.
Michael Palm (Aug 26 2022 at 11:15):
I know prelude
. But it also prevents all other import of the Init scripts. This makes tactics unusable.
Yakov Pechersky (Aug 26 2022 at 12:25):
Let's say you removed a core def. How would you like all of the parts of core that used the def to now work?
Yaël Dillies (Aug 26 2022 at 12:32):
Andrew Yang said:
Regarding the
not
, you will also need annot.elim {A B : Prop} : ¬A → A → B
.
Actually, Michael would rather need not.elim {A : Prop} {B : Sort*} : ¬A → A → B
.
Eric Wieser (Aug 26 2022 at 12:40):
Would the following work for you, Michael?
structure my_not (A : Prop) :=
intro :: (elim' : A →false)
rather than using axioms?
Kevin Buzzard (Aug 27 2022 at 08:57):
Instead of removing not
, why not just define not'
? (e.g. the way Eric defined it)
Last updated: Dec 20 2023 at 11:08 UTC