17 lines
316 B
Text
17 lines
316 B
Text
import Lean
|
||
|
||
def f (x : Nat × Nat) :=
|
||
match x with
|
||
| .mk (snd := snd) .. => snd
|
||
|
||
example : f (10, 20) = 20 := rfl
|
||
|
||
open Lean
|
||
def g (e : Expr) : Expr :=
|
||
match e with
|
||
| .forallE (binderType := type) .. => type
|
||
| e => e
|
||
|
||
def h (x : Nat × Nat) :=
|
||
match x with
|
||
| .mk (α := .(Nat)) (snd := snd) .. => snd
|