query: SELECT ?isbn13 ?statement WHERE{
   ?statement prov:wasDerivedFrom ?ref .
   ?ref pr:P212 ?isbn13 .
   BIND(lcase(?isbn13)AS?l)
   BIND(lcase("1234567890123")AS?i)
   BIND(SUBSTR(?i,4,1)AS?i41)BIND(SUBSTR(?i,4,2)AS?i42)
   BIND(SUBSTR(?i,4,3)AS?i43)BIND(SUBSTR(?i,4,4)AS?i44)
   BIND(SUBSTR(?i,4,5)AS?i45)BIND(SUBSTR(?i,6,7)AS?i67)
   BIND(SUBSTR(?i,7,6)AS?i76)BIND(SUBSTR(?i,8,5)AS?i85)
   BIND(SUBSTR(?i,9,4)AS?i94)BIND(SUBSTR(?i,10,3)AS?i103)
   BIND(SUBSTR(?i,11,2)AS?i112)BIND(SUBSTR(?i,12,1)AS?i121)
   BIND("-"AS?h)BIND(CONCAT(SUBSTR(?i,1,3),?h)AS?i13)
   BIND(CONCAT(?h,SUBSTR(?i,13,1))AS?x)
   FILTER(CONTAINS(?l, ?i)||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,1),?h,?i67,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,2),?h,?i76,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,3),?h,?i85,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,4),?h,?i94,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,5),?h,?i103,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,6),?h,?i112,?x))||
    CONTAINS(?l,CONCAT(?i13,?i41,?h,SUBSTR(?i,5,7),?h,?i121,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,1),?h,?i76,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,2),?h,?i85,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,3),?h,?i94,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,4),?h,?i103,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,5),?h,?i112,?x))||
    CONTAINS(?l,CONCAT(?i13,?i42,?h,SUBSTR(?i,6,6),?h,?i121,?x))||
    CONTAINS(?l,CONCAT(?i13,?i43,?h,SUBSTR(?i,7,1),?h,?i85,?x))||
    CONTAINS(?l,CONCAT(?i13,?i43,?h,SUBSTR(?i,7,2),?h,?i94,?x))||
    CONTAINS(?l,CONCAT(?i13,?i43,?h,SUBSTR(?i,7,3),?h,?i103,?x))||
    CONTAINS(?l,CONCAT(?i13,?i43,?h,SUBSTR(?i,7,4),?h,?i112,?x))||
    CONTAINS(?l,CONCAT(?i13,?i43,?h,SUBSTR(?i,7,5),?h,?i121,?x))||
    CONTAINS(?l,CONCAT(?i13,?i44,?h,SUBSTR(?i,8,1),?h,?i94,?x))||
    CONTAINS(?l,CONCAT(?i13,?i44,?h,SUBSTR(?i,8,2),?h,?i103,?x))||
    CONTAINS(?l,CONCAT(?i13,?i44,?h,SUBSTR(?i,8,3),?h,?i112,?x))||
    CONTAINS(?l,CONCAT(?i13,?i44,?h,SUBSTR(?i,8,4),?h,?i121,?x))||
    CONTAINS(?l,CONCAT(?i13,?i45,?h,SUBSTR(?i,9,1),?h,?i103,?x))||
    CONTAINS(?l,CONCAT(?i13,?i45,?h,SUBSTR(?i,9,2),?h,?i112,?x))||
    CONTAINS(?l,CONCAT(?i13,?i45,?h,SUBSTR(?i,9,3),?h,?i121,?x))
   )
  }