
theorem
  for D being non empty set, S being non empty Subset of D, f being
BinOp of D, g being BinOp of S for d being Element of D, d9 being Element of S
  st g = f||S & d9 = d holds (d is_a_left_unity_wrt f implies d9
  is_a_left_unity_wrt g) & (d is_a_right_unity_wrt f implies d9
  is_a_right_unity_wrt g) & (d is_a_unity_wrt f implies d9 is_a_unity_wrt g)
proof
  let D be non empty set, S be non empty Subset of D, f be BinOp of D;
  let g be BinOp of S, d be Element of D, d9 be Element of S such that
A1: g = f||S and
A2: d9 = d;
A3: dom g = [:S,S:] by FUNCT_2:def 1;
  thus d is_a_left_unity_wrt f implies d9 is_a_left_unity_wrt g
  proof
    assume
A4: for a being Element of D holds f.(d,a) = a;
    let a be Element of S;
    thus g.(d9,a) = f.[d9,a] by A1,A3,FUNCT_1:47
      .= f.(d,a) by A2
      .= a by A4;
  end;
  thus d is_a_right_unity_wrt f implies d9 is_a_right_unity_wrt g
  proof
    assume
A5: for a being Element of D holds f.(a,d) = a;
    let a be Element of S;
    thus g.(a,d9) = f.[a,d9] by A1,A3,FUNCT_1:47
      .= f.(a,d) by A2
      .= a by A5;
  end;
  assume
A6: d is_a_unity_wrt f;
  now
    let s be Element of S;
    reconsider s9 = s as Element of D;
A7: dom g = [:S,S:] by FUNCT_2:def 1;
    [d9,s] in [:S,S:];
    hence g.(d9,s) = f.(d,s9) by A1,A2,A7,FUNCT_1:47
      .= s by A6,BINOP_1:3;
    [s,d9] in [:S,S:];
    hence g.(s,d9) = f.(s9,d) by A1,A2,A7,FUNCT_1:47
      .= s by A6,BINOP_1:3;
  end;
  hence thesis by BINOP_1:3;
end;
