Theory Superposition_Calculus.Ground_Ctxt_Extra

theory Ground_Ctxt_Extra
  imports "Regular_Tree_Relations.Ground_Ctxt"
begin

lemma le_size_gctxt: "size t  size (CtG)"
  by (induction C) simp_all

lemma lt_size_gctxt: "ctxt  G  size t < size ctxttG"
  by (induction ctxt) force+

lemma gctxt_ident_iff_eq_GHole[simp]: "ctxttG = t  ctxt = G"
proof (rule iffI)
  assume "ctxttG = t"
  hence "size (ctxttG) = size t"
    by argo
  thus "ctxt = G"
    using lt_size_gctxt[of ctxt t]
    by linarith
next
  show "ctxt = G  ctxttG = t"
    by simp
qed

end