File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,16 @@ of transitivity.
314314-/
315315example (a b c : Nat) (pf1 : a = b) (pf2 : b = c) : True := by
316316 -- we would like to emulate calling something like
317- have pf3 := Eq.trans pf1 pf2
317+ have pf3 : a = c : = Eq.trans pf1 pf2
318318 -- but the full expression we want to build is
319319 have pf3' := @Eq.trans.{1 } Nat a b c pf1 pf2
320320 -- on tactic level, we have several ways to construct it
321321 run_tacq
322322 -- (a) low-level constructing the term, we have to provide all the arguments
323323 let lowlev := mkApp6 ((mkConst ``Eq.trans [1 ])) (mkConst ``Nat) a b c pf1 pf2
324324 logInfo m!"lowlev = {lowlev}"
325- -- (b) using `Qq`
326- let pfQ := q(Eq.trans $pf1 $pf2)
325+ -- (b) using `Qq`, the type annotation is optional
326+ let pfQ : Q($a = $c) : = q(Eq.trans $pf1 $pf2)
327327 logInfo m!"pfq = {pfQ}"
328328 -- (c) using `mkAppM`
329329 let pfAppM ← mkAppM ``Eq.trans #[pf1, pf2]
You can’t perform that action at this time.
0 commit comments