Property talk:P5236
Documentation
one of the prime numbers that can be multiplied to give this number
Represents | prime factor (Q1137759) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Data type | Item | |||||||||
Domain | natural number (Q21199) | |||||||||
Example | 2334 (Q19242165) → 2 (Q200) 389 (Q1194644) 3 (Q201) 5236 (Q19247022) → 2 (Q200) 7 (Q23350) 11 (Q37136) 17 (Q40118) 2 (Q200) → 2 (Q200) M82589933 (Q67171811) → M82589933 (Q67171811) | |||||||||
Tracking: usage | Category:Pages using Wikidata property P5236 (Q126375095) | |||||||||
Lists |
| |||||||||
Proposal discussion | Proposal discussion | |||||||||
Current uses |
| |||||||||
Search for values |
List of violations of this constraint: Database reports/Constraint violations/P5236#Type Q21199, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#Value type Q49008, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#Item P1181, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#allowed qualifiers, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#Target required claim P5236, SPARQL, SPARQL (by value)
Replacement property:
Replacement values: (Help)
List of violations of this constraint: Database reports/Constraint violations/P5236#none of, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#Item P7316, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5236#Entity types
List of violations of this constraint: Database reports/Constraint violations/P5236#Scope, SPARQL
This property is being used by:
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
(Help)
Violations query:
SELECT ?item { ?item wdt:P5236 ?item . MINUS { ?item wdt:P31 wd:Q49008 } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P5236#Items with self-links should be prime numbers
(Help)
Violations query:
SELECT ?item { ?item wdt:P5236 wd:Q200 . MINUS { ?item wdt:P31 wd:Q13366104 } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P5236#Items with prime factor 2 should be even numbers
FIXME. Currently just sum of factors, not product nor qualifier. See Wikidata:Request_a_query#Multiplication_(a*b*c)/PRODUCT()_instead_of_SUM(?factor) (Help)
Violations query:
SELECT ?item ?value (SUM(?factor) as ?a) (GROUP_CONCAT(?factor;separator="*") as ?product) WHERE { ?item wdt:P5236 / wdt:P1181 ?factor . ?item wdt:P1181 ?value . } GROUP BY ?item ?value HAVING ( ?a > ?value )
List of this constraint violations: Database reports/Complex constraint violations/P5236#Check on numeric values
Use qualifier "quantity" instead (Help)
Violations query:
SELECT ?item ?factor { hint:Query hint:optimizer "None". ?item p:P5236 ?st1 . ?st1 ps:P5236 ?factor . ?item p:P5236 ?st2 . ?st2 ps:P5236 ?factor . FILTER( ?st1 != ?st2 ) } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P5236#A factor should be listed just once
Doesn't work for very large numbers (Help)
Violations query:
SELECT ?item ?value { ?item wdt:P5236 ?factor ; wdt:P1181 ?value . ?factor wdt:P1181 ?factorvalue . FILTER ( ?value < 9223372036854775807 ) FILTER( round ( ?value / ?factorvalue ) != ( ?value / ?factorvalue ) ) } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P5236#Check value of factors
(Help)
Violations query:
SELECT ?item { ?item wdt:P31 wd:Q13366104 . MINUS { ?item wdt:P5236 wd:Q200 } } LIMIT 500
List of this constraint violations: Database reports/Complex constraint violations/P5236#Even numbers should have prime factor 2
(Help)
Violations query:
SELECT ?item { ?item wdt:P31 wd:Q21199 . MINUS { ?item wdt:P5236 [] } } LIMIT 1000
List of this constraint violations: Database reports/Complex constraint violations/P5236#Natural numbers would generally have this property
In case power of prime factor is 1
[edit]@ArthurPSmith: Is it need to use qualifier quantity (P1114) when the power of prime factor is 1? Or is it redundant? I think whichever's good, but we have to unify the data format. --Okkn (talk) 01:44, 5 June 2018 (UTC)
- Probably redundant... It does make things a little more compact to leave it out. ArthurPSmith (talk) 14:06, 5 June 2018 (UTC)
@Okkn, ArthurPSmith I see that a lot of data about numbers is redundant, e.g., 2 (Q200) is an instance of Sophie Germain prime (Q624025) but also of prime number (Q49008) though Sophie Germain prime (Q624025) is a subclass of prime number (Q49008). Is this desired? Type constraint: “Entities using the prime factor property should be instances of positive integer (or of a subclass of it), but RSA-100 currently isn't.” – But RSA-100 (Q15990637) is an instance of RSA number (Q1072840) which is a subclass of almost prime (Q936614) which is a subclass of composite number (Q50707) which is a subclass of positive integer (Q28920044), does this not suffice? (On another note, Eisenstein prime (Q898675) is currently a subclass of prime number (Q49008) but there are Eisenstein primes that are not prime numbers in the normal sense; I think prime element (Q240651) would be better.) -- IvanP (talk) 17:22, 5 June 2018 (UTC)
- @IvanP: at least some of those things have been fixed since the last time the constraint check ran, it's often out of date. ArthurPSmith (talk) 18:09, 5 June 2018 (UTC)
- As to the general question of P31 relations for the numbers, one should be careful as the precise definitions may not quite overlap - there are issues of whether 0 or negative numbers, or negative powers are included in the precise class, etc. But yes, in cases where it is clear I would say that it is sufficient to just say for example 2 is a particular subclass of prime rather than also state that it is prime. ArthurPSmith (talk) 18:12, 5 June 2018 (UTC)
- I would propose to use the qualifier for homogeneity. --Infovarius (talk) 08:08, 6 June 2018 (UTC)
Checks on values
[edit]See Property talk:P5236/checks. --- Jura 18:49, 13 September 2019 (UTC)
- All Properties
- Properties with wikibase-item-datatype
- Properties used on 100000+ items
- Properties with constraints on type
- Properties with constraints on items using them
- Properties with qualifiers constraints
- Properties with target required claim constraints
- Properties with none-of constraints
- Properties with entity type constraints
- Properties with scope constraints
- Properties with complex constraints