test(tests/playground/inst): add instantiate and instantiateRev simple tests
This commit is contained in:
parent
704f90d728
commit
6d7041fcb4
1 changed files with 16 additions and 0 deletions
16
tests/playground/inst.lean
Normal file
16
tests/playground/inst.lean
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import init.lean.expr
|
||||
open Lean
|
||||
|
||||
def main (xs : List String) : IO Unit :=
|
||||
do
|
||||
let f := mkConst `f;
|
||||
let x := Expr.bvar 0;
|
||||
let y := Expr.bvar 1;
|
||||
let t := Expr.app (Expr.app (Expr.app f x) y) x;
|
||||
let a := mkConst `a;
|
||||
let b := Expr.app f (mkConst `b);
|
||||
IO.println t.dbgToString;
|
||||
IO.println (t.instantiate [a, b].toArray).dbgToString;
|
||||
IO.println (t.instantiateRev [a, b].toArray).dbgToString;
|
||||
IO.println (t.instantiate [a].toArray).dbgToString;
|
||||
pure ()
|
||||
Loading…
Add table
Reference in a new issue