@[reducible, inline]
Equations
Instances For
Equations
Instances For
Equations
- Lean.Grind.AC.instReprExpr = { reprPrec := Lean.Grind.AC.instReprExpr.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Grind.AC.instBEqExpr.beq (Lean.Grind.AC.Expr.var a) (Lean.Grind.AC.Expr.var b) = (a == b)
- Lean.Grind.AC.instBEqExpr.beq (a.op a_1) (b.op b_1) = (Lean.Grind.AC.instBEqExpr.beq a b && Lean.Grind.AC.instBEqExpr.beq a_1 b_1)
- Lean.Grind.AC.instBEqExpr.beq x✝¹ x✝ = false
Instances For
Equations
- Lean.Grind.AC.Var.denote ctx x = PLift.rec (fun (x : α) => x) (ctx.vars.get x)
Instances For
Equations
- Lean.Grind.AC.Expr.denote ctx e = Lean.Grind.AC.Expr.rec (fun (x : Lean.Grind.AC.Var) => Lean.Grind.AC.Var.denote ctx x) (fun (x x : Lean.Grind.AC.Expr) (ih₁ ih₂ : α) => ctx.op ih₁ ih₂) e
Instances For
Instances For
Equations
Equations
- Lean.Grind.AC.instReprSeq = { reprPrec := Lean.Grind.AC.instReprSeq.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Grind.AC.instBEqSeq.beq (Lean.Grind.AC.Seq.var a) (Lean.Grind.AC.Seq.var b) = (a == b)
- Lean.Grind.AC.instBEqSeq.beq (Lean.Grind.AC.Seq.cons a a_1) (Lean.Grind.AC.Seq.cons b b_1) = (a == b && Lean.Grind.AC.instBEqSeq.beq a_1 b_1)
- Lean.Grind.AC.instBEqSeq.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- (Lean.Grind.AC.Expr.var x).toSeq' s = Lean.Grind.AC.Seq.cons x s
- (a.op b).toSeq' s = a.toSeq' (b.toSeq' s)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- (Lean.Grind.AC.Expr.var x).toSeq = Lean.Grind.AC.Seq.var x
- (a.op b).toSeq = a.toSeq' b.toSeq
Instances For
Equations
- e.toSeq_k = Lean.Grind.AC.Expr.rec Lean.Grind.AC.Seq.var (fun (a x : Lean.Grind.AC.Expr) (x ihb : Lean.Grind.AC.Seq) => a.toSeq'_k ihb) e
Instances For
theorem
Lean.Grind.AC.Expr.denote_toSeq'
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (e : Expr) (s : Seq),
Seq.denote ctx (e.toSeq' s) = ctx.op (denote ctx e) (Seq.denote ctx s)
theorem
Lean.Grind.AC.Expr.denote_toSeq
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (e : Expr), Seq.denote ctx e.toSeq = denote ctx e
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Grind.AC.Seq.var x).erase0 = Lean.Grind.AC.Seq.var x
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.Seq.denote_erase0
{α : Sort u_1}
(ctx : Context α)
{inst : Std.LawfulIdentity ctx.op (Var.denote ctx 0)}
(s : Seq)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.Seq.denote_insert
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(x : Var)
(s : Seq)
:
Equations
- (Lean.Grind.AC.Seq.var x).sort' acc = Lean.Grind.AC.Seq.insert x acc
- (Lean.Grind.AC.Seq.cons x s_2).sort' acc = s_2.sort' (Lean.Grind.AC.Seq.insert x acc)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.Seq.denote_sort'
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(s acc : Seq)
:
Equations
- (Lean.Grind.AC.Seq.var x).sort = Lean.Grind.AC.Seq.var x
- (Lean.Grind.AC.Seq.cons x s_2).sort = s_2.sort' (Lean.Grind.AC.Seq.var x)
Instances For
Equations
- s.sort_k = Lean.Grind.AC.Seq.rec (fun (x : Lean.Grind.AC.Var) => Lean.Grind.AC.Seq.var x) (fun (x : Lean.Grind.AC.Var) (s x_1 : Lean.Grind.AC.Seq) => s.sort' (Lean.Grind.AC.Seq.var x)) s
Instances For
theorem
Lean.Grind.AC.Seq.denote_sort
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(s : Seq)
:
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Grind.AC.Seq.var x).eraseDup = Lean.Grind.AC.Seq.var x
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.Seq.denote_eraseDup
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.IdempotentOp ctx.op}
(s : Seq)
:
Equations
- (Lean.Grind.AC.Seq.var x).concat s₂ = Lean.Grind.AC.Seq.cons x s₂
- (Lean.Grind.AC.Seq.cons x s_1).concat s₂ = Lean.Grind.AC.Seq.cons x (s_1.concat s₂)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.eq_orient
{α : Sort u_1}
(ctx : Context α)
(lhs rhs : Seq)
:
Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx rhs = Seq.denote ctx lhs
theorem
Lean.Grind.AC.eq_simp_lhs_exact
{α : Sort u_1}
(ctx : Context α)
(lhs₁ rhs₁ rhs₂ : Seq)
:
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₂ → Seq.denote ctx rhs₁ = Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.eq_simp_rhs_exact
{α : Sort u_1}
(ctx : Context α)
(lhs₁ rhs₁ lhs₂ : Seq)
:
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx lhs₁ → Seq.denote ctx lhs₂ = Seq.denote ctx rhs₁
theorem
Lean.Grind.AC.diseq_simp_lhs_exact
{α : Sort u_1}
(ctx : Context α)
(lhs₁ rhs₁ rhs₂ : Seq)
:
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₁ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx rhs₁ ≠ Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.diseq_simp_rhs_exact
{α : Sort u_1}
(ctx : Context α)
(lhs₁ rhs₁ lhs₂ : Seq)
:
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx lhs₁ → Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₁
theorem
Lean.Grind.AC.eq_simp_lhs_prefix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ tail lhs₂ rhs₂ lhs₂' : Seq),
simp_prefix_cert lhs₁ rhs₁ tail lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' = Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.eq_simp_rhs_prefix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ tail lhs₂ rhs₂ rhs₂' : Seq),
simp_prefix_cert lhs₁ rhs₁ tail rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.diseq_simp_lhs_prefix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ tail lhs₂ rhs₂ lhs₂' : Seq),
simp_prefix_cert lhs₁ rhs₁ tail lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' ≠ Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.diseq_simp_rhs_prefix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ tail lhs₂ rhs₂ rhs₂' : Seq),
simp_prefix_cert lhs₁ rhs₁ tail rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.eq_simp_lhs_suffix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head lhs₂ rhs₂ lhs₂' : Seq),
simp_suffix_cert lhs₁ rhs₁ head lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' = Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.eq_simp_rhs_suffix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head lhs₂ rhs₂ rhs₂' : Seq),
simp_suffix_cert lhs₁ rhs₁ head rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.diseq_simp_lhs_suffix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head lhs₂ rhs₂ lhs₂' : Seq),
simp_suffix_cert lhs₁ rhs₁ head lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' ≠ Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.diseq_simp_rhs_suffix
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head lhs₂ rhs₂ rhs₂' : Seq),
simp_suffix_cert lhs₁ rhs₁ head rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.eq_simp_lhs_middle
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head tail lhs₂ rhs₂ lhs₂' : Seq),
simp_middle_cert lhs₁ rhs₁ head tail lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' = Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.eq_simp_rhs_middle
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head tail lhs₂ rhs₂ rhs₂' : Seq),
simp_middle_cert lhs₁ rhs₁ head tail rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.diseq_simp_lhs_middle
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head tail lhs₂ rhs₂ lhs₂' : Seq),
simp_middle_cert lhs₁ rhs₁ head tail lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' ≠ Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.diseq_simp_rhs_middle
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs₁ rhs₁ head tail lhs₂ rhs₂ rhs₂' : Seq),
simp_middle_cert lhs₁ rhs₁ head tail rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂'
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.superpose
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
(p c s lhs₁ rhs₁ lhs₂ rhs₂ lhs rhs : Seq)
:
superpose_cert p c s lhs₁ rhs₁ lhs₂ rhs₂ lhs rhs = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs = Seq.denote ctx rhs
Given lhs₁ = rhs₁
and lhs₂ = rhs₂
where lhs₁ := p * c
and lhs₂ := c * s
,
lhs = rhs
where lhs := rhs₁ * s
and rhs := p * rhs₂
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.AC.Seq.unionFuel 0 s₁ s₂ = s₁.concat s₂
- Lean.Grind.AC.Seq.unionFuel fuel_2.succ (Lean.Grind.AC.Seq.var x₁) (Lean.Grind.AC.Seq.cons x s) = Lean.Grind.AC.Seq.insert x₁ (Lean.Grind.AC.Seq.cons x s)
- Lean.Grind.AC.Seq.unionFuel fuel_2.succ (Lean.Grind.AC.Seq.cons x s) (Lean.Grind.AC.Seq.var x₂) = Lean.Grind.AC.Seq.insert x₂ (Lean.Grind.AC.Seq.cons x s)
Instances For
Equations
- s₁.union s₂ = Lean.Grind.AC.Seq.unionFuel Lean.Grind.AC.hugeFuel s₁ s₂
Instances For
Equations
- s₁.union_k s₂ = Lean.Grind.AC.Seq.unionFuel_k Lean.Grind.AC.hugeFuel s₁ s₂
Instances For
theorem
Lean.Grind.AC.Seq.denote_union
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(s₁ s₂ : Seq)
:
theorem
Lean.Grind.AC.simp_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(c lhs rhs s s' : Seq)
:
simp_ac_cert c lhs rhs s s' = true → Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx s = Seq.denote ctx s'
Given lhs = rhs
, and a term s := union a lhs
, rewrite it to s' := union a rhs
theorem
Lean.Grind.AC.eq_simp_lhs_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(c lhs₁ rhs₁ lhs₂ rhs₂ lhs₂' : Seq)
:
simp_ac_cert c lhs₁ rhs₁ lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' = Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.eq_simp_rhs_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(c lhs₁ rhs₁ lhs₂ rhs₂ rhs₂' : Seq)
:
simp_ac_cert c lhs₁ rhs₁ rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂'
theorem
Lean.Grind.AC.diseq_simp_lhs_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(c lhs₁ rhs₁ lhs₂ rhs₂ lhs₂' : Seq)
:
simp_ac_cert c lhs₁ rhs₁ lhs₂ lhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂' ≠ Seq.denote ctx rhs₂
theorem
Lean.Grind.AC.diseq_simp_rhs_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(c lhs₁ rhs₁ lhs₂ rhs₂ rhs₂' : Seq)
:
simp_ac_cert c lhs₁ rhs₁ rhs₂ rhs₂' = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂ → Seq.denote ctx lhs₂ ≠ Seq.denote ctx rhs₂'
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Lean.Grind.AC.superpose_ac
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
(r₁ c r₂ lhs₁ rhs₁ lhs₂ rhs₂ lhs rhs : Seq)
:
superpose_ac_cert r₁ c r₂ lhs₁ rhs₁ lhs₂ rhs₂ lhs rhs = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ →
Seq.denote ctx lhs₂ = Seq.denote ctx rhs₂ → Seq.denote ctx lhs = Seq.denote ctx rhs
Given lhs₁ = rhs₁
and lhs₂ = rhs₂
where lhs₁ := union c r₁
and lhs₂ := union c r₂
,
lhs = rhs
where lhs := union r₂ rhs₁
and rhs := union r₁ rhs₂
Equations
- s.contains_k x = Lean.Grind.AC.Seq.rec (fun (y : Lean.Grind.AC.Var) => Nat.beq x y) (fun (y : Lean.Grind.AC.Var) (x_1 : Lean.Grind.AC.Seq) (ih : Bool) => (Nat.beq x y).or' ih) s
Instances For
theorem
Lean.Grind.AC.Seq.denote_insert_of_contains
{α : Sort u_1}
(ctx : Context α)
[inst₁ : Std.Associative ctx.op]
[inst₂ : Std.Commutative ctx.op]
[inst₃ : Std.IdempotentOp ctx.op]
(s : Seq)
(x : Var)
:
Equations
- Lean.Grind.AC.superpose_ac_idempotent_cert x lhs₁ rhs₁ rhs = (lhs₁.contains_k x).and' (rhs.beq' (Lean.Grind.AC.Seq.insert x rhs₁))
Instances For
Remark: see Section 4.1 of the paper "MODULARITY, COMBINATION, AC CONGRUENCE CLOSURE" to understand why
superpose_ac_idempotent
is needed.
theorem
Lean.Grind.AC.superpose_ac_idempotent
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.Commutative ctx.op}
{inst₃ : Std.IdempotentOp ctx.op}
(x : Var)
(lhs₁ rhs₁ rhs : Seq)
:
superpose_ac_idempotent_cert x lhs₁ rhs₁ rhs = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ → Seq.denote ctx lhs₁ = Seq.denote ctx rhs
Equations
- s.startsWithVar_k x = Lean.Grind.AC.Seq.rec (fun (y : Lean.Grind.AC.Var) => Nat.beq x y) (fun (y : Lean.Grind.AC.Var) (x_1 : Lean.Grind.AC.Seq) (x_2 : Bool) => Nat.beq x y) s
Instances For
theorem
Lean.Grind.AC.Seq.denote_concat_of_startsWithVar
{α : Sort u_1}
(ctx : Context α)
[inst₁ : Std.Associative ctx.op]
[inst₂ : Std.IdempotentOp ctx.op]
(s : Seq)
(x : Var)
:
Equations
- Lean.Grind.AC.superpose_head_idempotent_cert x lhs₁ rhs₁ rhs = (lhs₁.startsWithVar_k x).and' (rhs.beq' ((Lean.Grind.AC.Seq.var x).concat rhs₁))
Instances For
theorem
Lean.Grind.AC.superpose_head_idempotent
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.IdempotentOp ctx.op}
(x : Var)
(lhs₁ rhs₁ rhs : Seq)
:
superpose_head_idempotent_cert x lhs₁ rhs₁ rhs = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ → Seq.denote ctx lhs₁ = Seq.denote ctx rhs
superpose_ac_idempotent
for the non-commutative case. This is the "head"-case
Equations
- s.endsWithVar_k x = Lean.Grind.AC.Seq.rec (fun (y : Lean.Grind.AC.Var) => Nat.beq x y) (fun (x : Lean.Grind.AC.Var) (x : Lean.Grind.AC.Seq) (ih : Bool) => ih) s
Instances For
theorem
Lean.Grind.AC.Seq.denote_concat_of_endsWithVar
{α : Sort u_1}
(ctx : Context α)
[inst₁ : Std.Associative ctx.op]
[inst₂ : Std.IdempotentOp ctx.op]
(s : Seq)
(x : Var)
:
Equations
- Lean.Grind.AC.superpose_tail_idempotent_cert x lhs₁ rhs₁ rhs = (lhs₁.endsWithVar_k x).and' (rhs.beq' (rhs₁.concat (Lean.Grind.AC.Seq.var x)))
Instances For
theorem
Lean.Grind.AC.superpose_tail_idempotent
{α : Sort u_1}
(ctx : Context α)
{inst₁ : Std.Associative ctx.op}
{inst₂ : Std.IdempotentOp ctx.op}
(x : Var)
(lhs₁ rhs₁ rhs : Seq)
:
superpose_tail_idempotent_cert x lhs₁ rhs₁ rhs = true →
Seq.denote ctx lhs₁ = Seq.denote ctx rhs₁ → Seq.denote ctx lhs₁ = Seq.denote ctx rhs
superpose_ac_idempotent
for the non-commutative case. It is similar to superpose_head_idempotent
but for the "tail"-case
theorem
Lean.Grind.AC.eq_norm_a
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_a_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs = Expr.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_norm_ac
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_ac_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs = Expr.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_norm_ai
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_ai_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs = Expr.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_norm_aci
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} {x✝¹ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)}
(lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_aci_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs = Expr.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_erase_dup
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.IdempotentOp ctx.op} (lhs rhs lhs' rhs' : Seq),
eq_erase_dup_cert lhs rhs lhs' rhs' = true →
Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_erase0
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (lhs rhs lhs' rhs' : Seq),
eq_erase0_cert lhs rhs lhs' rhs' = true →
Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx lhs' = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_norm_a
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_a_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs ≠ Expr.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_norm_ac
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_ac_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs ≠ Expr.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_norm_ai
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_ai_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs ≠ Expr.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_norm_aci
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} {x✝¹ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)}
(lhs rhs : Expr) (lhs' rhs' : Seq),
eq_norm_aci_cert lhs rhs lhs' rhs' = true →
Expr.denote ctx lhs ≠ Expr.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_erase_dup
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.IdempotentOp ctx.op} (lhs rhs lhs' rhs' : Seq),
eq_erase_dup_cert lhs rhs lhs' rhs' = true →
Seq.denote ctx lhs ≠ Seq.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
theorem
Lean.Grind.AC.diseq_erase0
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (lhs rhs lhs' rhs' : Seq),
eq_erase0_cert lhs rhs lhs' rhs' = true →
Seq.denote ctx lhs ≠ Seq.denote ctx rhs → Seq.denote ctx lhs' ≠ Seq.denote ctx rhs'
Equations
- Lean.Grind.AC.diseq_unsat_cert lhs rhs = lhs.beq' rhs
Instances For
theorem
Lean.Grind.AC.diseq_unsat
{α : Sort u_1}
(ctx : Context α)
(lhs rhs : Seq)
:
diseq_unsat_cert lhs rhs = true → Seq.denote ctx lhs ≠ Seq.denote ctx rhs → False
theorem
Lean.Grind.AC.norm_a
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} (e : Expr) (s : Seq), e.toSeq.beq' s = true → Expr.denote ctx e = Seq.denote ctx s
theorem
Lean.Grind.AC.norm_ac
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} (e : Expr) (s : Seq),
e.toSeq.sort.beq' s = true → Expr.denote ctx e = Seq.denote ctx s
theorem
Lean.Grind.AC.norm_ai
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (e : Expr) (s : Seq),
e.toSeq.erase0.beq' s = true → Expr.denote ctx e = Seq.denote ctx s
theorem
Lean.Grind.AC.norm_aci
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.Commutative ctx.op} {x✝¹ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)}
(e : Expr) (s : Seq), e.toSeq.erase0.sort.beq' s = true → Expr.denote ctx e = Seq.denote ctx s
theorem
Lean.Grind.AC.eq_erase0_rhs
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.LawfulIdentity ctx.op (Var.denote ctx 0)} (lhs rhs rhs' : Seq),
rhs.erase0.beq' rhs' = true → Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx lhs = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_erase_dup_rhs
{α : Sort u_1}
(ctx : Context α)
:
∀ {x : Std.Associative ctx.op} {x✝ : Std.IdempotentOp ctx.op} (lhs rhs rhs' : Seq),
rhs.eraseDup.beq' rhs' = true → Seq.denote ctx lhs = Seq.denote ctx rhs → Seq.denote ctx lhs = Seq.denote ctx rhs'
theorem
Lean.Grind.AC.eq_expr_seq_seq
{α : Sort u_1}
(ctx : Context α)
(e : Expr)
(s₁ s₂ : Seq)
:
Expr.denote ctx e = Seq.denote ctx s₁ → Seq.denote ctx s₁ = Seq.denote ctx s₂ → Expr.denote ctx e = Seq.denote ctx s₂
theorem
Lean.Grind.AC.imp_eq
{α : Sort u_1}
(ctx : Context α)
(lhs rhs : Expr)
(s : Seq)
:
Expr.denote ctx lhs = Seq.denote ctx s →
Expr.denote ctx rhs = Seq.denote ctx s → Expr.denote ctx lhs = Expr.denote ctx rhs