Zulip Chat Archive

Stream: new members

Topic: Structure fields


Nicolò Cavalleri (Jul 01 2021 at 11:46):

If I have a structure

structure test :=
(foo : proposition)
(bar : proposition)

is there a way to do something like this (i.e. using a proof done for a previous filed without registering a lemma outside the definition)?

def hey : test :=
{ foo := by {...},
  bar := by simp [foo] }

Floris van Doorn (Jul 01 2021 at 11:49):

You could do

def hey : test :=
let foo : ... := ... in
{ foo := foo,
  bar := by simp [foo] }

Last updated: Dec 20 2023 at 11:08 UTC