Closed yutakang closed 4 years ago
Note that the bound term can be of a product type:
@{term "let (x1, x2, x3) = y in z"};
val it =
Const ("HOL.Let", "'a × 'b × 'c ⇒ ('a × 'b × 'c ⇒ 'd) ⇒ 'd")
$ Free ("y", "'a × 'b × 'c")
$ (Const ("Product_Type.prod.case_prod", "('a ⇒ 'b × 'c ⇒ 'd) ⇒ 'a × 'b × 'c ⇒ 'd") $
Abs ("x1", "'a",
Const ("Product_Type.prod.case_prod", "('b ⇒ 'c ⇒ 'd) ⇒ 'b × 'c ⇒ 'd") $
Abs ("x2", "'b", Abs ("x3", "'c", Free ("z", "'d"))))):
term
Not perfect, but it is done in 5ca65dc68272ccef97d9a3486ba5c876c84e6fc5 for now.
Probably we can introduce a syntactic sugar
With_Let_X_Be_Y_In_Z (x, y, z)
.Such syntactic sugar would be useful in
Nearest_Neighbor.ML
.