proposition: Lemma extz_sext_eq_rect: forall sz (w: word sz) n1 n2 nsz Hnsz1, exists Hnsz2, eq_rect (n2 + (sz + n1)) word (extz (sext w n1) n2) nsz Hnsz1 = eq_rect (n2 + sz + n1) word (sext (extz w n2) n1) nsz Hnsz2.
proof: Proof. intros; subst; simpl. assert (Hsz: n2 + sz + n1 = n2 + (sz + n1)) by lia. exists Hsz. pose proof (extz_sext w n1 n2). pose proof (eq_sigT_snd H). rewrite <-H0. eq_rect_simpl. reflexivity. Qed.
imports: Coq.Classes.Morphisms Coq.Classes.Morphisms_Prop Coq.Classes.Equivalence Coq.Arith.PeanoNat Coq.ZArith.BinInt  Coq.Arith.Arith Coq.NArith.NArith Coq.Bool.Bool Coq.ZArith.ZArith Coq.Logic.Eqdep_dec Coq.Logic.EqdepFacts Coq.Program.Tactics Coq.Program.Equality Coq.setoid_ring.Ring Coq.setoid_ring.Ring_polynom bbv.Nomega bbv.ZLib bbv.NatLib bbv.NLib bbv.N_Z_nat_conversions bbv.DepEq bbv.DepEqNat bbv.ReservedNotations Coq.micromega.Lia