Zulip Chat Archive

Stream: new members

Topic: inr


Iocta (Dec 23 2019 at 20:41):

What is the difference between

example : (p  q)  (p  r)  q  r :=
(assume h: (p  q)  (p  r),
  show q  r,
  from or.elim h
  (λ z, or.intro_left _ (and.right z))
  (λ z, or.intro_right _ (and.right z))
)

which compiles and

example : (p  q)  (p  r)  q  r :=
(assume h: (p  q)  (p  r),
  show q  r,
  from or.elim h
  (λ z, or.inl  (and.right z))
  (λ z, or.inr (and.right z))
)

which doesn't?

Kenny Lau (Dec 23 2019 at 20:43):

(deleted)

Kenny Lau (Dec 23 2019 at 20:43):

(deleted)

Kenny Lau (Dec 23 2019 at 20:44):

they both compile for me

Kenny Lau (Dec 23 2019 at 20:45):

variables {p q r : Prop}

example : (p  q)  (p  r)  q  r :=
(assume h: (p  q)  (p  r),
  show q  r,
  from or.elim h
  (λ z, or.intro_left _ (and.right z))
  (λ z, or.intro_right _ (and.right z))
)

example : (p  q)  (p  r)  q  r :=
(assume h: (p  q)  (p  r),
  show q  r,
  from or.elim h
  (λ z, or.inl  (and.right z))
  (λ z, or.inr (and.right z))
)

Kenny Lau (Dec 23 2019 at 20:45):

assuming you didn't forget variables {p q r : Prop}

Iocta (Dec 23 2019 at 20:48):

Oh. they both work for me now too. it just took a while for flycheck to get updated. :-)


Last updated: Dec 20 2023 at 11:08 UTC