The defense attorney and the judge should have asked for a competency evaluation before he pled guilty if there was ANY question that he did not have the mental faculties to understand his rights, waive his rights, know the punishment, know his rights to a trial, and know the burden of proof is on the government to prove him guilty beyond a reasonable doubt. Judges are normally very careful about this and require a written and oral admission of wrongdoing with acknowledgment that they are not being forced or coerced.
The information provided in this answer does not create an attorney-client relationship. If you are interested in his legal services, feel free to call Chris at (303) 409-7635 at his law office in the Denver Tech Center. All initial consultations are free of charge.