Renaming and add proof to theoreme function