File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -3423,6 +3423,28 @@ Notation "x .[& A ]" := (restrictf x A) : fmap_scope.
34233423Notation "x .[\ A ]" := (x.[& domf x `\` A]) : fmap_scope.
34243424Notation "x .[~ k ]" := (x.[\ [fset k]]) : fmap_scope.
34253425
3426+ Section FMapRect.
3427+
3428+ Variables (T : choiceType) (S : Type) (P : {fmap T -> S} -> Type).
3429+
3430+ Hypothesis P0 : P [fmap].
3431+ Hypothesis P1 : forall m, P m -> forall x y, x \notin domf m -> P m.[x <- y].
3432+
3433+ Lemma fmap_rect m : P m.
3434+ Proof .
3435+ move e: (domf m) => X.
3436+ elim/fset1U_rect: X => [|x X xX IH] in m e *.
3437+ by move/fmap_nil: e => ->.
3438+ have x_m : x \in domf m by rewrite e fset1U1.
3439+ pose y := m.[x_m].
3440+ have {}e: domf m.[~ x] = X by rewrite domf_rem e fsetU1K.
3441+ have -> : m = m.[~ x].[x <- y].
3442+ by rewrite -[LHS](setf_get [` x_m]) /= setf_rem1.
3443+ by apply: P1; rewrite ?e //; apply: IH.
3444+ Qed .
3445+
3446+ End FMapRect.
3447+
34263448Section Cat.
34273449Variables (K : choiceType) (V : Type).
34283450Implicit Types (f g : {fmap K -> V}).
You can’t perform that action at this time.
0 commit comments