Metamath Proof Explorer


Theorem posqsqznn

Description: When a positive rational squared is an integer, the rational is a positive integer. zsqrtelqelz with all terms squared and positive. (Contributed by SN, 23-Aug-2024)

Ref Expression
Hypotheses posqsqznn.1 φA2
posqsqznn.2 φA
posqsqznn.3 φ0<A
Assertion posqsqznn φA

Proof

Step Hyp Ref Expression
1 posqsqznn.1 φA2
2 posqsqznn.2 φA
3 posqsqznn.3 φ0<A
4 2 qred φA
5 0red φ0
6 5 4 3 ltled φ0A
7 4 6 sqrtsqd φA2=A
8 7 2 eqeltrd φA2
9 zsqrtelqelz A2A2A2
10 1 8 9 syl2anc φA2
11 7 10 eqeltrrd φA
12 elnnz AA0<A
13 11 3 12 sylanbrc φA