proposition: Lemma congr_big_nat : forall m1 n1 m2 n2 P1 P2 F1 F2, m1 = m2 -> n1 = n2 -> (forall i, m1 <= i < n2 -> P1 i = P2 i) -> (forall i, P1 i && (m1 <= i < n2) -> F1 i === F2 i) -> \big[op/idx]_(m1 <= i < n1 | P1 i) F1 i === \big[op/idx]_(m2 <= i < n2 | P2 i) F2 i.
proof: Proof. move=> m n _ _ P1 P2 F1 F2 <- <- eqP12 eqF12. rewrite -> (big_cond_seq _ P1), -> (big_cond_seq _ P2). apply: eq_big => i; rewrite ?inE /= !mem_index_iota; last exact: eqF12. case inmn_i: (m <= i < n); rewrite ?(andbT, andbF) //; exact: eqP12. Qed.
imports: ssreflect ssrbool ssrfun eqtype ssrnat seq div choice fintype finfun paths Setoid Morphisms OperationClasses bigops