Open kmill opened 4 days ago
This PR modifies structure instance notation to admit binders and type ascriptions for fields. Example:
structure PosFun where f : Nat → Nat pos : ∀ n, 0 < f n def p : PosFun := { f n := n + 1 pos := by simp }
Just like for the structure where notation, a field f x y z : ty := val expands as f := fun x y z => (val : ty). The type ascription is optional.
where
f x y z : ty := val
f := fun x y z => (val : ty)
Mathlib CI status (docs):
This PR modifies structure instance notation to admit binders and type ascriptions for fields. Example:
Just like for the structure
where
notation, a fieldf x y z : ty := val
expands asf := fun x y z => (val : ty)
. The type ascription is optional.