defpred S1[ object , object ] means ( ( $1 in A implies $2 = +infty ) & ( not $1 in A implies $2 = 0 ) );
A1:
for x being object st x in X holds
ex y being object st S1[x,y]
A2:
for x, y1, y2 being object st x in X & S1[x,y1] & S1[x,y2] holds
y1 = y2
;
consider f being Function such that
A3:
( dom f = X & ( for x being object st x in X holds
S1[x,f . x] ) )
from FUNCT_1:sch 2(A2, A1);
for x being object st x in X holds
f . x in ExtREAL
then reconsider f = f as Function of X,ExtREAL by A3, FUNCT_2:3;
take
f
; for x being object st x in X holds
( ( x in A implies f . x = +infty ) & ( not x in A implies f . x = 0 ) )
thus
for x being object st x in X holds
( ( x in A implies f . x = +infty ) & ( not x in A implies f . x = 0 ) )
by A3; verum