使用这个组的定义:
Structure group :=
{
G :> Set;
id : G;
op : G -> G -> G;
inv : G -> G;
op_assoc_def : forall (x y z : G), op x (op y z) = op (op x y) z;
op_inv_l : forall (x : G), id = op (inv x) x;
op_id_l : forall (x : G), x = op id x
}.
(** Set implicit arguments *)
Arguments id {g}.
Arguments op {g} _ _.
Arguments inv {g} _.
Notation "x # y" := (op x y) (at level 50, left associativity).
并证明了这个定理:
Theorem mult_both_sides (G : group) : forall (a b c : G),
a = b <-> c # a = c # b.
我如何编写一个 Ltac 来自动将给定的等式(目标本身或假设)乘以给定项的过程?
理想情况下,在证明中使用这个 Ltac 应该是这样的:
left_mult (arbitrary expression).
left_mult (arbitrary expression) in (hypothesis).