Admitted.
Definition ConstantFunction {A B: Type} {sA: SigmaAlgebra A} {sB: SigmaAlgebra B} (b0: B): MeasurableFunction A B.
apply (Build_MeasurableFunction _ _ _ _ (fun a b => b = b0)).
+ intros.
congruence.
+ intros.
exists b0; auto.
+ intros.
destruct (classic (P b0)).
- eapply is_measurable_set_proper; [| apply full_measurable].
split; hnf; unfold In; simpl; intros.
* constructor.
* subst; auto.
- eapply is_measurable_set_proper; [| apply complement_measurable; apply full_measurable].
split; hnf; unfold Complement, In; simpl; intros.
* specialize (H0 b0); exfalso; auto.
* exfalso; apply H0; constructor.
Defined.
Definition Indicator {A B: Type} {sA: SigmaAlgebra A} {sB: SigmaAlgebra B} (P: measurable_set A) (b0 b1: B): MeasurableFunction A B.
apply (Build_MeasurableFunction _ _ _ _ (fun a b => P a /\ b = b1 \/ ~ P a /\ b = b0)).
+ intros.
destruct H as [[? ?] | [? ?]], H0 as [[? ?] | [? ?]]; try tauto; subst; auto.
+ intros.
destruct (classic (P a)).
- exists b1; left.
auto.
- exists b0; right.
auto.
+ intros.
destruct (classic (P0 b1)), (classic (P0 b0)).
- eapply is_measurable_set_proper; [| apply full_measurable].
split; hnf; unfold In; simpl; intros.
* constructor.
* destruct H2 as [[? ?] | [? ?]]; subst; auto.
- eapply is_measurable_set_proper; [| apply (proj2_sig P)].
split; hnf; unfold In; simpl; intros.
* specialize (H1 b0).
assert (b0 <> b1) by (intro; subst; auto).
destruct (classic (P x)); tauto.
* destruct H2 as [[? ?] | [? ?]]; subst; tauto.
- eapply is_measurable_set_proper; [| apply complement_measurable; apply (proj2_sig P)].
split; hnf; unfold Complement, In; simpl; intros.
* specialize (H1 b1).
assert (b1 <> b0) by (intro; subst; auto).
tauto.
* destruct H2 as [[? ?] | [? ?]]; subst; tauto.
- eapply is_measurable_set_proper; [| apply complement_measurable; apply full_measurable].
split; hnf; unfold Complement, In; simpl; intros.
* pose proof (H1 b0).
pose proof (H1 b1).
tauto.
* exfalso; apply H1; constructor.
Defined.

Lemma Indicator_True: forall {A B: Type} {sA: SigmaAlgebra A} {sB: SigmaAlgebra B} (P: measurable_set A) (b0 b1: B) (a: A), P a -> Indicator P b0 b1 a b1.