
theorem LmDE21:
  for L being Z_Lattice,
      v being Vector of DivisibleMod(L), I being Basis of EMbedding(L)
  st for u being Vector of DivisibleMod(L) st u in I
  holds (ScProductDM(L)).(v, u) in INT.Ring
  holds v is Dual of L
  proof
    let L be Z_Lattice, v be Vector of DivisibleMod(L),
    I be Basis of EMbedding(L) such that
    A1: for u being Vector of DivisibleMod(L) st u in I
    holds (ScProductDM(L)).(v, u) in INT.Ring;
    defpred P[Nat] means
    for I being finite Subset of EMbedding(L) st card I = $1
    & I is linearly-independent
    & for u being Vector of DivisibleMod(L) st u in I
    holds (ScProductDM(L)).(v, u) in INT.Ring
    holds for w being Vector of DivisibleMod(L) st w in Lin(I) holds
    (ScProductDM(L)).(v, w) in INT.Ring;
    P1: P[0]
    proof
      let I be finite Subset of EMbedding(L) such that
      B1: card I = 0 & I is linearly-independent &
      for u being Vector of DivisibleMod(L) st u in I
      holds (ScProductDM(L)).(v, u) in INT.Ring;
      I = {}(the carrier of EMbedding(L)) by B1;
      then B2: Lin(I) = (0).EMbedding(L) by ZMODUL02:67;
      for w being Vector of DivisibleMod(L) st w in Lin(I)
      holds (ScProductDM(L)).(v, w) in INT.Ring
      proof
        let w be Vector of DivisibleMod(L) such that
        C1: w in Lin(I);
        w = 0.EMbedding(L) by B2,C1,ZMODUL02:66
        .= zeroCoset(L) by ZMODUL08:def 3
        .= 0.DivisibleMod(L) by ZMODUL08:def 4;
        then (ScProductDM(L)).(w, v) in INT.Ring by LmDE00;
        hence thesis by ZMODLAT2:6;
      end;
      hence thesis;
    end;
    P2: for n being Nat st P[n] holds P[n+1]
    proof
      let n be Nat such that
      B1: P[n];
      let I be finite Subset of EMbedding(L) such that
      B2: card I = n+1 & I is linearly-independent &
      for u being Vector of DivisibleMod(L) st u in I
      holds (ScProductDM(L)).(v, u) in INT.Ring;
      I is non empty by B2;
      then consider u be object such that
      B3: u in I;
      reconsider u as Vector of EMbedding(L) by B3;
      set Iu = I \ {u};
      {u} is Subset of I by B3,SUBSET_1:41;
      then B4: card(Iu) = n+1 - card({u}) by B2,CARD_2:44
      .= n+1 - 1 by CARD_1:30
      .= n;
      reconsider Iu as finite Subset of EMbedding(L);
      I = Iu \/ {u} by B3,XBOOLE_1:45,ZFMISC_1:31;
      then B5: Lin(I) = Lin(Iu) + Lin{u} by ZMODUL02:72;
      B7: Iu c= I by XBOOLE_1:36;
      B6: Iu is linearly-independent by B2,XBOOLE_1:36,ZMODUL02:56;
      B8: for w being Vector of DivisibleMod(L) st w in Iu
      holds (ScProductDM(L)).(v, w) in INT.Ring by B2,B7;
      let w be Vector of DivisibleMod(L) such that
      C1: w in Lin(I);
      consider w1, w2 be Vector of EMbedding(L) such that
      C2: w1 in Lin(Iu) & w2 in Lin{u} & w = w1 + w2 by B5,C1,ZMODUL01:92;
      CX: EMbedding(L) is Submodule of DivisibleMod(L) by ZMODUL08:24;
      then C9: w1 is Vector of DivisibleMod(L) by ZMODUL01:25;
      reconsider ww1 = w1 as Vector of DivisibleMod(L) by CX,ZMODUL01:25;
      C3: (ScProductDM(L)).(v, w1) in INT.Ring by B1,B4,B6,B8,C2,C9;
      consider i be Element of INT.Ring such that
      C4: w2 = i*u by C2,ZMODUL06:19;
      u is Element of DivisibleMod(L) by CX,ZMODUL01:25;
      then C6: (ScProductDM(L)).(v, u) in INT.Ring by B2,B3;
      reconsider uu = u as Element of DivisibleMod(L) by CX,ZMODUL01:25;
      i*uu in DivisibleMod(L);
      then reconsider ww2 = w2 as Vector of DivisibleMod(L)
      by C4,CX,ZMODUL01:29;
      C11: (ScProductDM(L)).(v, i*u) = (ScProductDM(L)).(v, i*uu)
      by CX,ZMODUL01:29
      .= (ScProductDM(L)).(i*uu, v) by ZMODLAT2:6
      .= i* (ScProductDM(L)).(uu, v) by ZMODLAT2:6
      .= i* (ScProductDM(L)).(v, u) by ZMODLAT2:6;
      C10: w = ww1 + ww2 by C2,CX,ZMODUL01:28;
      (ScProductDM(L)).(v, w) = (ScProductDM(L)).(w, v) by ZMODLAT2:6
      .= (ScProductDM(L)).(ww1, v) + (ScProductDM(L)).(ww2, v)
      by C10,ZMODLAT2:6
      .= (ScProductDM(L)).(v, w1) + (ScProductDM(L)).(ww2, v) by ZMODLAT2:6
      .= (ScProductDM(L)).(v, w1) + (ScProductDM(L)).(v, w2) by ZMODLAT2:6;
      hence thesis by C3,C4,C6,C11,INT_1:def 2;
    end;
    P3: for n being Nat holds P[n] from NAT_1:sch 2(P1,P2);
    P4: card I is Nat;
    I is linearly-independent & EMbedding(L) = Lin(I) by VECTSP_7:def 3;
    then for w being Vector of DivisibleMod(L) st w in EMbedding(L) holds
    (ScProductDM(L)).(v, w) in INT.Ring by A1,P3,P4;
    hence thesis by defDualElement;
  end;
